Script/console not working after Rails 1.1 upgrade


#1

Whenever I do script/console I get an error message:

Loading development enviroment.
c:/ruby/lib/ruby/1.8/irb/init.rb:151: in ‘parse_opts’ : undefined method
‘upcase’ for nil:NilClass (NoMethodError)
from c:/ruby/lib/ruby/1.8/irb/init.rb: in ‘setup’
from c:/ruby/lib/ruby/1.8/irb/init.rb:54: in ‘start’
from c:/ruby/bin/irb:13

It used to work before I upgraded to Rails 1.1. Everything else
(webrick) works. I’ve a feeling that it’s because I’m using Ruby 1.82

Any Ideas?


#2

Hello Alex,

2006/3/30, Alex removed_email_address@domain.invalid:

Loading development enviroment.
c:/ruby/lib/ruby/1.8/irb/init.rb:151: in ‘parse_opts’ : undefined method
‘upcase’ for nil:NilClass (NoMethodError)
from c:/ruby/lib/ruby/1.8/irb/init.rb: in ‘setup’
from c:/ruby/lib/ruby/1.8/irb/init.rb:54: in ‘start’
from c:/ruby/bin/irb:13

It used to work before I upgraded to Rails 1.1. Everything else
(webrick) works. I’ve a feeling that it’s because I’m using Ruby 1.82

Two things:

  1. Upgrade to Rails 1.8.4
  2. Edit vendor/rails/railties/lib/commands/console.rb and remove the
    “–prompt-mode simple” option from the last line:
    Index: vendor/rails/railties/lib/commands/console.rb
    ===================================================================
    — vendor/rails/railties/lib/commands/console.rb (revision 4097)
    +++ vendor/rails/railties/lib/commands/console.rb (working copy)
    @@ -22,4 +22,4 @@
    else
    puts “Loading #{ENV[‘RAILS_ENV’]} environment.”
    end
    -exec “#{options[:irb]} #{libs} --prompt-mode simple”
    +exec “#{options[:irb]} #{libs}”

Using 1.8.4 is recommended, although I haven’t gone down that route yet.

Hope that helps !


#3

Alex wrote:

(webrick) works. I’ve a feeling that it’s because I’m using Ruby 1.82

Any Ideas?

I had the same problem
(http://livsey.org/2006/03/27/scriptconsole-with-edge-rails-on-windows-with-182/)

See this ticket and grab the irb.bat attached which should fix the
problem.
http://dev.rubyonrails.org/ticket/4362

hth


#4

Dave S. wrote:

On Thursday 30 Mar 2006 17:36, Francois B. wrote:

Two things:

  1. Upgrade to Rails 1.8.4

Surely you mean Ruby 1.8.4? :wink:

~Dave

Upgrading to Rails 1.8.4 should fix the problem too.

May be waiting a while for that one though :op


#5

On Thursday 30 Mar 2006 17:36, Francois B. wrote:

Two things:

  1. Upgrade to Rails 1.8.4

Surely you mean Ruby 1.8.4? :wink:

~Dave

Dave S.
Rent-A-Monkey Website Development
http://www.rentamonkey.com/

PGP Key: http://www.rentamonkey.com/pgpkey.asc


#6

2006/3/30, Dave S. removed_email_address@domain.invalid:

On Thursday 30 Mar 2006 17:36, Francois B. wrote:

Two things:

  1. Upgrade to Rails 1.8.4

Surely you mean Ruby 1.8.4? :wink:

Uh, yeah. You’re right. Can you see I think in Rails all the time ?

Chuckle all you want. I laughed out loud instead :slight_smile:

Bye !


#7

I’m having problems running rails at all w/ ruby 1.8.4. It compiles
clean but it won’t run rails. Anyone else have problems like this?


#8

Have you tried installing rails again after installing ruby?
-Nathan


#9

Brett,

Thanks for the post, I recently checked your site,
www.adnexus-recruitment.nl, but didnt see many Ruby jobs. I was
wondering as I’m developing with a company in Amsterdam, have 5 years
J2EE and about 1 year in Rails, are you still looking for developers?

Best regards
Paul


#10

Hi all,

I’m helping lots of developers and architects in The Netherlands find
jobs
using Ruby on Rails, if anyone is interested in contacting me for work -
permanent or contract based, I might be able to help.

Regards
Brett

Brett Dawkins
Adnexus Recruitment Services
Tel: + 31 20 799 7988
Email: removed_email_address@domain.invalid