wycats/thor — Issue #188: Thor::Util.ruby_command semi-issue
Author: sgonyea
Created: 2011-10-24 22:10:44+00:00
State: open

This is less an issue, and more of a question.

I generated a rails projects using Rubinius, and later switched to MRI (using RVM) to compare behavior... But what happens is:

```
$ rails c
/Users/sgonyea/.rvm/rubies/ruby-1.9.2-p290/bin/ruby: no Ruby script found in input (LoadError)
```

Reason being, the "script/rails" command looks like:

```ruby
#!/usr/bin/env rbx
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.

APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'
```

Notice line 1--it expects "rbx" to be my ruby executable.

What's nice about RVM is that it makes switching between rubies to be pretty transparent; had I created the rails project using MRI, I'd have never noticed the issue.

Are there any thoughts on how best to handle this? Or, a better way to phrase it: Who's problem is this?

It's a trivial issue, but it's tedious to debug and may be discouraging for people playing with non-MRI rubies.

Would a patch be accepted, that allows an ENV variable to override whatever is in RbConfig? Or, because this uses RbConfig, should RVM / rbenv be responsible for configuring this at compile time? Or should I just buzz off? :)

If nothing else, this issue will show up on Google and save that small group of people some time. Feel free to close this issue whenever.