使用ubuntu 10.04,rvm。起初,我已經用rvm,gem rails安裝了ruby 1.9.2並生成了一些新項目併成功啓動了它。一切工作正常。但是,改變到另一個項目,執行捆綁安裝命令(輸出看起來OK),並啓動軌道服務器後 - 錯誤發生時:找不到寶石欄 - 寶石:: GemNotFoundException
軌小號
/home/jacek/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/site_ruby/1.9.1/rubygems.rb:316:in `bin_path': can't find gem rails ([">= 0"]) with executable rails (Gem::GemNotFoundException)
from /home/jacek/.rvm/gems/ruby-1.9.2-p318/bin/rails:19:in `<main>'
寶石列表軌
*** LOCAL GEMS ***
rails (3.2.2)
寶石ENV
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.18
- RUBY VERSION: 1.9.2 (2012-02-14 patchlevel 318) [i686-linux]
- INSTALLATION DIRECTORY: /home/jacek/.rvm/gems/ruby-1.9.2-p318
- RUBY EXECUTABLE: /home/jacek/.rvm/rubies/ruby-1.9.2-p318/bin/ruby
- EXECUTABLE DIRECTORY: /home/jacek/.rvm/gems/ruby-1.9.2-p318/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/jacek/.rvm/gems/ruby-1.9.2-p318
- /home/jacek/.rvm/gems/[email protected]
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
我的路徑(包括可執行文件目錄:/home/jacek/.rvm/gems/ruby-1.9.2- P318 /箱)
/home/jacek/.rvm/gems/ruby-1.9.2-p318/bin:/home/jacek/.rvm/gems/[email protected]/bin:/home/jacek/.rvm/rubies/ruby-1.9.2-p318/bin:/home/jacek/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
我會任何幫助
如果你嘗試'bundle exec rails s',會發生什麼? – Batkins 2012-03-13 14:32:15
嗯有另一個錯誤,可能與其他寶石。看起來你的解決方案是正確的。你能告訴我,爲什麼我不能只輸入rails? – zachar 2012-03-13 14:37:57
'./script/rails s'使用Gemfile – shingara 2012-03-13 14:50:44