Heroku Bundle Error (Rails App)

后端 未结 2 1994
猫巷女王i
猫巷女王i 2020-12-10 18:47

i\'m new to Ruby on Rails, app is running on local machine

local bundle works

however when i try to git push heroku master,

相关标签:
2条回答
  • 2020-12-10 19:01

    I had a similar problem. The issue is that Bundler is generating stubs. Rails 4 apps do not store stubs in the app's bin/ directory. In order to fix this problem you need to use the following commands:

    $ bundle config --delete bin
    

    Then you need to update the bin directory to use the new Rails 4 executables

    $ rake rails:update:bin
    

    Then add the new bin/ directory to your version control using:

    $ git add bin
    

    Commit the changes and push your code to Heroku

    0 讨论(0)
  • 2020-12-10 19:12

    the issue is with your ruby PATH. so first see what happens when you run

    $ heroku run "ruby -v"
    Running `ruby -v` attached to terminal... up, run.8734
    ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
    

    Do you get similar output? If not, then check your path.

    $ heroku config -s | grep PATH
    GEM_PATH=vendor/bundle/ruby/1.9.1
    PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
    

    notice, how bin is in the path. in case its missing from yours, you can manually set PATH and add the bin by following command.

    $ heroku config:set PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
    
    0 讨论(0)
提交回复
热议问题