我自己设置了在我的本地mac book air lion dev环境中将我的应用程序从rails 3.1升级到rails 3.2.6的任务。我跟着这个guide并升级了ruby,我的所有宝石似乎都安装了,rails -v给出了rails 3.2.6的答案。如果我运行任何rails命令,例如rails c启动控制台,我明白了:
MacBook-Air:myapp bob$ rails c
/Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/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/ruby-1.9.3-p0@rails32/gems/pubnub-ruby-0.0.9/lib/pubnub-ruby.rb:1:in `<top (required)>'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/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/ruby-1.9.3-p0@rails32/gems/railties-3.2.6/lib/rails/commands.rb:39:in `require'
from /Users/bob/.rvm/gems/ruby-1.9.3-p0@rails32/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/ruby-1.9.3-p0@rails32/gems/pubnub-ruby-0.0.9/lib/pubnub-ruby.rb:1文件存在,我打开了它细
有没有人知道发生了什么/是特定于pubnub还是其他什么?我不确定如何进一步排除故障,谷歌搜索到目前为止还没有带来什么。
谢谢,
戴夫
答案 0 :(得分:1)
我在repo for that gem中看不到文件pubnub-ruby.rb
。尝试运行$ bundle install
或$ gem update pubnub-ruby
。