This project is archived and is in readonly mode.
railties/bin/rails non-operational in current clone of master
-
Kieran P
This problem still exists in the latest clone of master.
-
José Valim
- Assigned user changed from Yehuda Katz (wycats) to José Valim
- Milestone cleared.
Kieran,
I have them working on my ubuntu.
Before you add the line above, what was the first line? -
Kieran P
The first line is
require File.dirname(__FILE__) + '/../lib/ruby_version_check'Which is clearly ruby, but when I run ./rails/railties/bin/rails it interprets it as a bash script.
The interpreter declaration (which is present in all other bin scripts within Rails that I've found, including the script files in a new Rails app) fixes this issue.
The other solution is to use
ruby rails/railties/bin/railsbut I really don't think that is very friendly.
-
José Valim
- State changed from new to open
Sorry, I got it wrong. For me you couldn't run RAILS_ROOT/scripts/* files.
I will fix that. Thanks! -
Kieran P
- Title changed from script/rails non-operational in current clone of master to railties/bin/rails non-operational in current clone of master
Ah, sorry. Poorly worded original ticket. Correcting it now.
-
Rizwan Reza
verified
+1 This is still present in master branch. I cannot seem to run rails command by running.
But I still think this is intentional. Just because 2-3-stable has it the same way. Please invalidate if this isn't a bug.
-
José Valim
- State changed from open to wontfix
Rails should not add a shebang to the bin files. When you install a gem, rubygems creates this:
#!/usr/local/bin/ruby # # This file was generated by RubyGems. # # The application 'rails' is installed as part of a gem, and # this file is here to facilitate running it. # require 'rubygems' version = ">= 0" if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then version = $1 ARGV.shift end gem 'rails', version load 'rails'In other words, rubygems is responsible for adding the shebang. If you run it from your fork, unfortunately you will have to give the whole path.
-
Steve St. Martin
-1 agreed this was probably removed from master due to rubygems, therefore this issue will only exist when using a checkout rather then a gem, running 'ruby rails/railties/bin/rails' is acceptable.