/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require': can not load such file - bundler (LoadError)

0

Hi, I'm trying to create an app with Ruby on Rails but when I create a project it gives me the following error:

/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require': cannot load such file -- bundler (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:328:in 'bundle_command'
from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:344:in 'run_bundle'
from (eval):1:in 'run_bundle'
from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in 'run'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in 'invoke_command'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in 'block in invoke_all'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in 'each'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in 'map'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in 'invoke_all'
from /usr/lib/ruby/vendor_ruby/thor/group.rb:232:in 'dispatch'
from /usr/lib/ruby/vendor_ruby/thor/base.rb:440:in 'start'
from /usr/lib/ruby/vendor_ruby/rails/commands/application.rb:17:in '<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /usr/lib/ruby/vendor_ruby/rails/cli.rb:14:in '<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /usr/bin/rails:9:in '<main>'

I can not find out what does not work, since I followed all the installation steps as they mark me

    
asked by Begoña Sustatxa 25.05.2018 в 16:33
source

1 answer

1

From what you see in the log that you have added, the problem is that you are missing a very important gem called bundler , the which allows you to manage versions and dependencies of other gems.

It can be installed like any other gem:

gem install bundler

Surely you need superuser permissions (install it as root or by adding sudo to the previous command) because you are using the Ruby version that comes by default in Ubuntu 16.04.

As an additional comment, if you want to work with another version of Ruby, or simply not depend on the Ruby version of the system, I advise you to use rvm or rbenv .

Greetings.

    
answered by 26.05.2018 в 20:39