我希望有人在這裏有一些鼓勵性的話語和一些建議。rake undefined方法'gsub'for nil:NilClass
我使用Ruby v1.9.2的P290
我一直在建立一個新的生產服務器,我有一個可怕的時間試圖獲得新的環境中正常工作。一切都安裝好了,現在我試圖運行rake
,但它給了我一個我無法理解的錯誤,並且找不到任何Internet幫助。
[email protected]:~/pm$ rake -v --trace
rake aborted!
undefined method `gsub' for nil:NilClass
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:77:in `rescue in rescue in block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:72:in `rescue in block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:62:in `block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
/home/deploy/pm/config/application.rb:14:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/home/deploy/pm/Rakefile:5:in `<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19:in `<main>'
這裏是我的寶石名單
actionmailer (3.1.0)
actionpack (3.1.0)
activemodel (3.1.0)
activerecord (3.1.0)
activeresource (3.1.0)
activesupport (3.1.0)
archive-tar-minitar (0.5.2)
arel (2.2.3)
bcrypt-ruby (3.0.1)
builder (3.0.0)
bundler (1.1.4)
cancan (1.6.8)
capybara (1.1.2)
childprocess (0.3.3)
client_side_validations (3.1.4)
cocaine (0.2.1)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
columnize (0.3.6)
cucumber (1.2.1)
cucumber-rails (1.3.0)
daemon_controller (1.0.0)
database_cleaner (0.8.0)
devise (1.5.3)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.4.0)
factory_girl (3.5.0)
factory_girl_rails (3.5.0)
faker (1.0.1)
fastthread (1.0.7)
ffi (1.0.11)
geocoder (1.1.2)
gherkin (2.11.1)
guard (1.2.3)
guard-rspec (1.2.0)
haml (3.1.6)
haml-rails (0.3.4)
hike (1.2.1)
hpricot (0.8.6)
httparty (0.8.3)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (1.0.19)
json (1.7.3)
json_pure (1.7.3)
jsonify (0.3.1)
jsonify-rails (0.3.2)
libv8 (3.3.10.4 x86_64-linux)
linecache19 (0.5.12)
listen (0.4.7)
mail (2.3.3)
meta_search (1.1.3)
mime-types (1.19)
minitest (1.6.0)
multi_json (1.3.6)
multi_xml (0.5.1)
mysql2 (0.3.11)
nokogiri (1.5.5)
orm_adapter (0.0.7)
paperclip (2.7.0)
passenger (3.0.17)
polyamorous (0.5.0)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.0.3)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.0)
rails3-jquery-autocomplete (1.0.7)
railties (3.1.0)
rake (0.9.2)
rb-fchange (0.0.5)
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
rdoc (3.12, 2.5.8)
remotipart (1.0.2)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.3)
rspec-mocks (2.11.2)
rspec-rails (2.11.0)
ruby-debug-base19 (0.11.25)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)
ruby_parser (2.3.1)
rubyzip (0.9.9)
sass (3.1.20)
sass-rails (3.1.4)
selenium-webdriver (2.7.0)
sexp_processor (3.2.0)
simple_datatables (0.2.1)
sprockets (2.0.4)
therubyracer (0.10.1)
thor (0.14.6)
tilt (1.3.3)
timeliness (0.3.6)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.6)
validates_timeliness (3.0.12)
warden (1.2.1)
web-app-theme (0.8.0)
webrat (0.7.3)
will_paginate (3.0.3)
xpath (0.1.4)
我已經花了好幾天這一點,沒有多少頭髮的毛都拔後留在我的頭上。
有什麼建議嗎? Ruby on Rails是一個很好的工作平臺,但是我很困惑這個。
你在服務器上運行的是什麼版本的ruby和rubygems?你是否嘗試設置rvm或rbenv,以便確保它不是一個破碎的系統 - 紅寶石? – phoet
我正在使用Ruby 1.9.2p290。我沒有安裝rvm,因爲我讀過這對於生產服務器來說不是個好主意。那個想法是虛假的嗎? –
沒有理由不在生產服務器上使用rvm或rbenv。 – phoet