我爲自己設置了在我的本地mac book air lion dev環境中將我的應用從rails 3.1升級到rails 3.2.6的任務。我跟着這個guide和紅寶石升級,我所有的寶石似乎安裝和軌道-v給出了軌道3.2.6的答案。如果我運行任何rails命令,例如導軌C鍵啓動控制檯,我得到這個:從rails 3.1升級到3.2.6後出現錯誤
MacBook-Air:myapp bob$ rails c
/Users/bob/.rvm/gems/[email protected]/gems/pubnub-ruby-0.0.9/lib/pubnub-ruby.rb:1:in `require': cannot load such file -- ./pubnub.rb (LoadError)
from /Users/bob/.rvm/gems/[email protected]/gems/pubnub-ruby-0.0.9/lib/pubnub-ruby.rb:1:in `<top (required)>'
from /Users/bob/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
from /Users/bob/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/bob/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
from /Users/bob/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
from /Users/bob/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
from /Users/bob/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
from /Users/bob/.rvm/gems/[email protected]/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
from /Users/bob/work/myapp/config/application.rb:13:in `<top (required)>'
from /Users/bob/.rvm/gems/[email protected]/gems/railties-3.2.6/lib/rails/commands.rb:39:in `require'
from /Users/bob/.rvm/gems/[email protected]/gems/railties-3.2.6/lib/rails/commands.rb:39:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
是我在我的應用程序中使用pubnub - 這一直工作正常,所以我不懷疑這未必是問題。
application.rb中的13號線(可能不相關)是
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
我在部署之前做預編譯的資產。
/Users/bob/.rvm/gems/[email protected]ils32/gems/pubnub-ruby-0.0.9/lib/pubnub-ruby.rb:1文件存在,我打開很好。
有沒有人知道最近發生了什麼/它是pubnub具體還是別的?我不確定如何進一步排除故障,Google目前沒有提供任何信息。
感謝,
戴夫
gem update pubnub-ruby 正在更新已安裝的寶石 沒有更新 - 它似乎認爲它是最新的。這很奇怪,pubnub-ruby.rb僅包含:require「./pubnub.rb」,如果我將其改爲需要「pubnub.rb」 - 它會傳遞該錯誤但會卡住pubnub.rb:24:在'require' :無法加載這樣的文件 - ./lib/PubnubCrypto.rb(LoadError) ...和是的pubnubCrypto不會被發現 – Dave
從看到回購的歷史,它看起來像他們做了一些名稱更改。也許試試用'$ gem uninstall pubnub-ruby'卸載並重新安裝gem,然後''gem install pubnub-ruby' – nbsp
已解決 - 您指出我的方向正確。看來pubnub-ruby停止在0.0.9,切換到'pubnub'gem並安裝了0.1.9,錯誤被清除。謝謝。 – Dave