![](/img/trans.png)
[英]Ruby on Rails: Bundler couldn't find some gems.Did you run 'bundle install'
[英]ruby server “Bundler couldnt find some gems” bundler will not install
我已经在本地克隆了一个1.8.7 rails应用程序,并且试图运行ruby服务器,但是当我键入“ ruby server”时,出现以下错误:
./../config/../config/preinitializer.rb:18: Bundler couldn't find some gems.Did you run `bundle install`? (RuntimeError)
from ./../config/boot.rb:28:in `load'
from ./../config/boot.rb:28:in `preinitialize'
from ./../config/boot.rb:10:in `boot!'
from ./../config/boot.rb:124
from server:2:in `require'
from server:2
因此,我然后尝试通过“ gem install bundler”安装捆绑程序,但收到此错误:
Successfully installed bundler-1.3.5
1 gem installed
dyld: lazy symbol binding failed: Symbol not found: _rb_intern2
Referenced from: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/json- 1.7.7/lib/json/ext/parser.bundle
Expected in: flat namespace
dyld: Symbol not found: _rb_intern2
Referenced from: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/json-1.7.7/lib/json/ext/parser.bundle
Expected in: flat namespace
...并且不会运行“捆绑安装”
ERROR: Gem bundler is not installed, run `gem install bundler` first.
我当前正在运行3.2.12 rails,是否需要切换到早期版本? 我已经安装了RVM。 我在这方面还很陌生,所以任何帮助将不胜感激! 提前致谢。
我猜测1.8.7是您的红宝石版本,而不是rails版本,尽管您声称它是。 还是要在当前的Rails版本上运行1.8.7 Rails应用程序? 如果是这样,那不是一个好主意。 首先,启动服务器时,正确的语法是rails server
或rails s
。
这是RVM的问题。 您的RVM版本是什么? 您的操作系统是什么? RVM和OSX Snow Leopard存在一个已知问题。 尝试检查您的ruby版本( ruby -v
),并确保仅安装了一个版本,然后再次捆绑安装以在rvm use 1.9.3
之后进行更新。
另外,在启动新的shell时,请确保bash_profile( /home/$USER/.bash_profile
)中的rvm代码正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.