Rake aborted! no such file to load --bundler/setup Rails 3.1

前端 未结 9 838
慢半拍i
慢半拍i 2021-02-04 23:41

I am very new in Rails. after I created a new rails project.

rails new test project

I ran

rake db:create 

In

相关标签:
9条回答
  • 2021-02-05 00:07

    Have you tried to gem install bundler? I'd be surprised it doesn't install when you install the rails gem, but it seems that's your issue...

    0 讨论(0)
  • 2021-02-05 00:09

    I got the same error as you while upgrading a non-rails project from Ruby 1.8.x to Ruby 1.9.x. The problem is that the current dir has been removed from LOAD_PATH.

    Why does Ruby 1.9.2 remove “.” from LOAD_PATH, and what's the alternative?

    I had to change a few places from require to require_relative and then it worked.

    0 讨论(0)
  • 2021-02-05 00:11

    In your Gemfile, under group :test do add gem 'rack'.

    0 讨论(0)
  • 2021-02-05 00:15

    I just had the same issue. I didn't solve it fully but by running:

    bundle exec rake <task> 
    

    I was able to finally run the task I wanted without the error you have.

    0 讨论(0)
  • 2021-02-05 00:16

    Got the same missing bundler message running rake after upgrading to Ruby 1.9.2.

    Rake needed updating and bundler needed to be reinstalled:

    sudo gem update rake

    sudo gem install bundler

    Reinstalling bundler might have fixed the error, but you want to make sure rake is right too.

    0 讨论(0)
  • 2021-02-05 00:19

    try

    gem install bundler

    bundle install

    to install the gems needed.

    rake tasks will fail if you do not have the gems necessary for the rails app.

    0 讨论(0)
提交回复
热议问题