简体   繁体   中英

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:

./../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:

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? I have RVM installed. 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. Or are you trying to run a 1.8.7 rails app on your current rails version? If so, not a good idea. First of all, when starting your server the correct syntax is rails server or rails s for short.

This is a problem with RVM. What is your RVM version? What is your operating system? There is a known problem with RVM and 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 .

Also, make sure the rvm code in your bash_profile ( /home/$USER/.bash_profile ) is correct when starting a new shell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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