简体   繁体   中英

Ruby on Rails Bundler issues LoadError

I believe I am having some PATH issues for my gems.

I am using rvm (version 1.29.3) with ruby (version 2.4.1) and rails (version 5.1.4)

I tried to run rails new myapp to which I get the following LoadErrors:

remove  config/initializers/new_framework_defaults_5_1.rb
run  bundle install
   /Users/fabienbessez/.rvm/rubies/ruby-2.4.1/bin/ruby: No such file or directory 
-- /Users/fabienbessez/.rvm/rubies/ruby-
   2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle (LoadError)
run  bundle exec spring binstub --all
   /Users/fabienbessez/.rvm/rubies/ruby-2.4.1/bin/ruby: No such file or directory 
   -- /Users/fabienbessez/.rvm/rubies/ruby 
   2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle (LoadError)

I get the same error when I try to then run bundle install

I checked the contents of ~/.rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems to which I found that bundler-1.15.4 but not bundler-1.16.0 . I assume that that is the issue. But I can't figure out how to update those gems. gem install bundler says it has installed bundler 1.16.0 but this is not being updated.

Any ideas??

Thanks!

您是否尝试过使用gem uninstall bundler卸载所有旧版本的gem uninstall bundler

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