This project is archived and is in readonly mode.
let rails use load to interpret script/rails
Reported by Xavier Noria | February 20th, 2010 @ 01:23 PM | in 3.0.2
The current rails command uses exec to run script/rails. This works as long as we are on Unix and script/rails is executable. This patch switches to load, which is portable.
If script/rails is executable and has a shebang pointing to a different vm than the one the rails command runs under, that shebang will have no effect with this approach.
I think that this patch allows us to send the uniform message that the rails command is the way to go nonetheless, and in that edge case people could still run script/rails manually.
Comments and changes to this ticket
-
Xavier Noria February 23rd, 2010 @ 12:24 AM
- Assigned user set to DHH
Added a new patch that in addition recurses upwards searching for script/rails.
-
Xavier Noria February 23rd, 2010 @ 10:49 PM
Using load has also issues, because if you have an app running the rails 3.0 gem, and your rails command belongs to the rails 3.1 gem, the rails gem has already been activated to 3.1.
We pondered options with wycats and the winner was to switch back to exec, but passing the current interpreter. If you need a different vm, or have a custom shebang that needs to be honored you can still run script/rails directly.
-
Xavier Noria February 23rd, 2010 @ 10:56 PM
- no changes were found...
-
Xavier Noria February 23rd, 2010 @ 10:59 PM
- no changes were found...
-
Sam Ruby February 25th, 2010 @ 04:27 PM
- Milestone cleared.
My two cents "rails command known not to work on Windows" should be considered a blocker for the next beta.
-
Repository February 25th, 2010 @ 04:32 PM
- State changed from new to committed
(from [bf0f14579aa793f2ab29ec092c517d04e702dbe3]) let the rails command recurse upwards looking for script/rails, and exec ruby on it for better portability [Xavier Noria] (Closes #4008) http://github.com/rails/rails/commit/bf0f14579aa793f2ab29ec092c517d...
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to High
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 4008 let rails use load to interpret script/rails (from [bf0f14579aa793f2ab29ec092c517d04e702dbe3]) let the...