bin/rails: No such file or directory w/ Ruby 2 & Rails 4 on Heroku
After struggling with this for a bit, I noticed that my Rails 4 project had a /bin
directory, unlike some older Rails 3 projects I had cloned. /bin
contains 3 files, bundle
, rails
, and rake
, but these weren't making it to Heroku because I had bin
in my global .gitignore
file.
This is a pretty common ignore rule if you work with Git and other languages (Java, etc.), so to fix this:
- Remove
bin
from~/.gitignore
- Run
bundle install
- Commit your
changes withgit add .
andgit commit -m "Add bin back"
- Push your changes to Heroku with
git push heroku master
Starting out with ruby: bin/rails: No such file or directory
You have to be in app folder. Do cd *app_name*
Heroku App Crash H10 - bash: bin/rails: No such file or directory
I found a solution to the problem - it's quite simple:
heroku config:set PATH=bin:vendor/bundle/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin
I found the solution here: https://devcenter.heroku.com/articles/ruby-versions
heroku run rake db:migrate: No such file or directory
I've found the solution. Apparently i had to update the files located at bin folder with this command
rake rails:update:bin
Ruby : /app/bin/ruby: No such file or directory - Collector
You should pass a full path to the executable file. If it in the lib directory
collector: bundle exec ruby ./lib/flow.rb -p $PORT
Related Topics
What Exactly Is the Singleton Class in Ruby
In Ruby on Rails, How to Format a Date With the "Th" Suffix, as In, "Sun Oct 5Th"
How to Create a Deep Copy of an Object in Ruby
What Does 'Monkey Patching' Exactly Mean in Ruby
How to Get a Single Character Without Pressing Enter
Nokogiri/Xpath Namespace Query
Pg::Error: Select Distinct, Order by Expressions Must Appear in Select List
Is There an Efficient Way to Perform Hundreds of Text Substitutions in Ruby
How to Download a File from a Url and Save It in Rails
Can't Install Rmagick 2.13.1. Can't Find Magickwand.H.
How to Replace Accented Latin Characters in Ruby
Ruby Multiline Block Without Do End