简体   繁体   English

红宝石服务器“捆绑器找不到某些宝石”捆绑器将无法安装

[英]ruby server “Bundler couldnt find some gems” bundler will not install

I have cloned a 1.8.7 rails app locally and I am trying to run the ruby server, but when i type "ruby server" i receive the following error: 我已经在本地克隆了一个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

So I then tried to install the bundler via "gem install bundler" but received this error: 因此,我然后尝试通过“ 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

...and it will not run "bundle install" ...并且不会运行“捆绑安装”

ERROR: Gem bundler is not installed, run `gem install bundler` first.

I am currently running 3.2.12 rails, do i need to switch to an earlier version? 我当前正在运行3.2.12 rails,是否需要切换到早期版本? I have RVM installed. 我已经安装了RVM。 I am fairly new at this so any help would be much appreciated! 我在这方面还很陌生,所以任何帮助将不胜感激! Thanks in advance. 提前致谢。

I'm guessing 1.8.7 is your ruby version, and not rails version despite you claiming it is. 我猜测1.8.7是您的红宝石版本,而不是rails版本,尽管您声称它是。 Or are you trying to run a 1.8.7 rails app on your current rails version? 还是要在当前的Rails版本上运行1.8.7 Rails应用程序? If so, not a good idea. 如果是这样,那不是一个好主意。 First of all, when starting your server the correct syntax is rails server or rails s for short. 首先,启动服务器时,正确的语法是rails serverrails s

This is a problem with RVM. 这是RVM的问题。 What is your RVM version? 您的RVM版本是什么? What is your operating system? 您的操作系统是什么? There is a known problem with RVM and OSX Snow Leopard. RVM和OSX Snow Leopard存在一个已知问题。 Try checking your ruby version ( ruby -v ) and make sure just one version is installed, and bundle install again to update after rvm use 1.9.3 . 尝试检查您的ruby版本( ruby -v ),并确保仅安装了一个版本,然后再次捆绑安装以在rvm use 1.9.3之后进行更新。

Also, make sure the rvm code in your bash_profile ( /home/$USER/.bash_profile ) is correct when starting a new shell. 另外,在启动新的shell时,请确保bash_profile( /home/$USER/.bash_profile )中的rvm代码正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM