我为自己设置了在我的本地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