LoadError: cannot load such file -- bundler/setup

11,704

Solution 1

The error shows you are using the system Ruby, not RVM. You need to tell Pow to use the right Ruby version. You need to create a .rvmrc file specifying which Ruby to use, and also create or edit a .powrc or .powenv file to tell Pow to load RVM. See the Pow docs on using RVM.

Solution 2

Create a Gemset with RVM

rvm use 2.2.3@yourproject --create

After that install bundler gem

gem install bundler

and last step is to do bundle install

bundle install
Share:
11,704
FastSolutions
Author by

FastSolutions

Fast Solutions builds beautiful, user-friendly websites. Specifically designed to help achieve our customers' goals. All our websites are easy to adjust yourself.

Updated on June 04, 2022

Comments

  • FastSolutions
    FastSolutions almost 2 years

    We are upgrading to the latest ruby version (2.2.3) and latest rails version (4.2.4) and we can't get pass this error:

    LoadError: cannot load such file -- bundler/setup
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    ~/Documents/remsis/config/boot.rb:6:in `<top (required)>'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    ~/Documents/remsis/config/application.rb:1:in `<top (required)>'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    ~/Documents/remsis/config/environment.rb:2:in `<top (required)>'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    ~/Documents/remsis/config.ru:3:in `block in <main>'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
    ~/Documents/remsis/config.ru:1:in `new'
    ~/Documents/remsis/config.ru:1:in `<main>'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `eval'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:51:in `load_config'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:42:in `initialize'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `new'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/lib/nack/server.rb:12:in `run'
    ~/Library/Application Support/Pow/Versions/0.5.0/node_modules/nack/bin/nack_worker:4:in `<main>'