Skip to content

Can't run script/console for rails 2.3.2 application #134

Closed
jarnold opened this Issue Dec 31, 2009 · 5 comments

5 participants

@jarnold
jarnold commented Dec 31, 2009
$ rbx -S script/console
Loading development environment (Rails 2.3.5)
An exception occurred running script/console
    Unknown errno : execvp(2) failed (SystemCallError)

Backtrace:
                   Kernel(Object)#exec at kernel/common/process.rb:622
                      main.__script__ at /usr/local/rubinius/gems/1.8/gems/rails-2.3.5
                                         /lib/commands/console.rb:45
    Rubinius::CompiledMethod#as_script at kernel/common/compiled_method.rb:230
           Requirer::Utils.single_load at kernel/delta/requirer.rb:251
       Requirer::Utils.unified_load {} at kernel/delta/requirer.rb:137
                            Array#each at kernel/bootstrap/array.rb:156
          Requirer::Utils.unified_load at kernel/delta/requirer.rb:102
  Kernel(Object)#gem_original_require (require) at kernel/common/kernel.rb:737
                Kernel(Object)#require at lib/rubygems/custom_require.rb:31
                       main.__script__ at script/console:3
    Rubinius::CompiledMethod#as_script at kernel/common/compiled_method.rb:230
           Requirer::Utils.single_load at kernel/delta/requirer.rb:251
   Requirer::Utils.load_from_extension at kernel/delta/requirer.rb:336
               Rubinius::Loader#script at kernel/loader.rb:376
                 Rubinius::Loader#main at kernel/loader.rb:485
                     Object#__script__ at kernel/loader.rb:489
@khaled
khaled commented Jan 30, 2010

Running into the same issue with 1.0.0-rc2. Installed via rvm 0.1.3 on Mac OS X 10.5.8.

@khaled
khaled commented Jan 30, 2010

More info:

  • happens with a plain vanilla rails app created with rails 2.3.5
  • also occurs with rubinius head: rubinius 1.0.0-rc2 (1.8.7 eaed6e7 2010-01-04 JI) [i686-apple-darwin9.8.0]
@dbussink
Rubinius member

The problem is most likely that ./script/console calls out to irb again directly. Therefore it could be that it's not executing rbx's irb, but for example the one from mri. If you don't have Rails available there or a different version, it would fail.

You can test it with something like this:
./script/console --irb=/path/to/rbx

Does it work if you do that?

@companygardener

rubinius 1.0.0-rc3 (1.8.7 feb4fed 2010-02-16 JI) [x86_64-apple-darwin10.2.0]
rails 2.3.5
script/console
Fails with "Unrecognized option: --simple-prompt"

@evanphx
Rubinius member
evanphx commented Mar 27, 2010

rails 2.3.5 hardcodes calling irb, if you want to use it under rubinius, you must do:

./script/console --irb="/path/to/rbx -S irb"

Rails 3 fixes this problem, allowing you to do "/path/to/rbx script/console" and having it work as you'd expect.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.