-1

Its weird with CentOS release 6.7 (Final) that unable to run console on stage.

  • Ruby-version => 2.0.0
  • Rails- version => 4.1

Once I do bin/rails c staging

/var/www/rails/Ixentech/releases/20151201150901/config/application.rb:7:in `<top (required)>': uninitialized constant Bundler (NameError)
    from /home/carmatec/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'
    from /home/carmatec/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'
    from /home/carmatec/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
    from /home/carmatec/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:67:in `console'
    from /home/carmatec/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /home/carmatec/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
    from /home/carmatec/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
    from /home/carmatec/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    from /home/carmatec/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from bin/rails:4:in `<main>'

as I completely check with

Any help would be appreciate !!!

Community
  • 1
  • 1
Gupta
  • 8,882
  • 4
  • 49
  • 59

1 Answers1

0

Try gem install bundler from the command line. Then you'll also want to bundle install from the project directory.

It looks like your system doesn't have "bundler" installed on it yet. Bundler is a dependency manager, once it's installed the bundle install command will install any other gems needed by your project (such as rails itself!).

Did you copy this project directory over from another computer, or git clone it there or something? Cause you'd need bundler installed to create a Rails app in the first place, normally.

Bundler isn't actually included with a ruby install, but you need it as the first thing for Rails, and much other modern ruby code. After installing ruby on a new machine (or starting fresh on a new machine that has ruby pre-installed) gem install bundler should always be the next step.

jrochkind
  • 22,799
  • 12
  • 59
  • 74