script/console does not work

script/concolse does not work in Rails 2.1.0, 2.1.1 for me

script/console
Loading development environment (Rails 2.1.1)

reload!

NoMethodError: undefined method `reload!' for main:Object
  from (myirb):1

Article.find(1)

NameError: uninitialized constant Article
  from (myirb):2

But i know, that Artice model exists

On what platform are you working? Why does the trace have (myirb) in it instead of (irb)? Were you able to load script/console at any other time in the past under Rails 2.1.0/2.1.1?

While we’re happy to help, rubyonrails-talk [ http://groups.google.com/group/rubyonrails-talk?hl=en ] is the place to ask your type of question in the future. This list, rubyonrails-core, is for the development of Rails itself.

Regards,
Craig

Thanx for idea, this is because of my .irbrc (i use Ubuntu 8.04).
But there nothing criminal:

cat .irbrc

IRB.conf[:IRB_NAME]="myirb"
IRB.conf[:BACK_TRACE_LIMIT]=16
IRB.conf[:USE_LOADER] = false
IRB.conf[:USE_READLINE] = true
IRB.conf[:USE_TRACER] = false
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:IGNORE_EOF] = false
IRB.conf[:DEBUG_LEVEL]=0
IRB.conf[:VERBOSE]=true
IRB.conf[:LOAD_MODULES]=['irb/completion']

After i rename .irbrc - all works fine. Any ideas?

On what platform are you working? Why does the trace have (myirb) in it
instead of (irb)? Were you able to load script/console at any other time in
the past under Rails 2.1.0/2.1.1?

While we're happy to help, rubyonrails-talk [http://groups.google.com/group/rubyonrails-talk?hl=en] is the place to ask
your type of question in the future. This list, rubyonrails-core, is for the
development of Rails itself.

Thanx you, Craig, I understand purpose of this list. I think this is a
bug in rails, therefore i've written here.

Hello.

This line is root of problem
IRB.conf[:LOAD_MODULES]=['irb/completion']

After i comment it, script/console start works.

Ivan,

I don’t have any ideas at this point why that config file change affects IRB the way that it does. I haven’t yet used a .irbrc file to customize my environment.

Craig

This line is root of problem
IRB.conf[:LOAD_MODULES]=['irb/completion']

I believe this is just configuration sugar for require 'irb/completion'

After i comment it, script/console start works.

Can you start irb on its own and require irb/completion? Perhaps
you're missing a required package? Ubuntu and debian have this
annoying habit of splitting ruby into dozens of smaller packages, all
of which are required if you want to have a decent development
experience.