This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
http://www.nabble.com/NetBeans-6.1-Rails-Console-td16714440.html
Thanks for filing this. Could you please try whether script/console --irb='irb --noreadline' using the command line works for you?
Emonomem, You may be on to something. Here are the results of starting the console: C:\InstantRails20\rails_apps\blog>ruby script/console --irb='irb --noreadline' Loading development environment (Rails 2.0.2) C:/InstantRails20/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/console.rb:32:in `exec': Exec format error - irb --noreadline -r irb/co mpletion -r "C:/InstantRails20/rails_apps/blog/config/environment" -r console_app -r console_with_helpers --simple- prompt (Errno::ENOEXEC) from C:/InstantRails20/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/console.rb:32 from C:/InstantRails20/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from C:/InstantRails20/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from script/console:3 C:\InstantRails20\rails_apps\blog>ruby script/console Loading development environment (Rails 2.0.2) >> Note that when I start it without the irb command line parameters that you provided, it works fine so the readline support is a problem?
Yes, looks like the readline support could be the problem (unless the argument formatting should be different on Windows, e.g. it should be without the single quotes or something similar). The readline arg was added to fix issue 130264, looks like there needs to be a check for what platform is used. PS. Sorry for the slow progress on this, I haven't got around to install Windows yet.
I can confirm, that issue is irb part --irb='irb --readline' option. See rails/lib/commands/console.rb - RUBY_PLATFORM is checked at the beginning (and 'irb.bat' selected under Windows), then options are parsed and 'irb.bat' gets replaced by 'irb --readline'. So, YES, you should check platform and pass 'irb --readline' or 'irb.bat --readline' accordingly. My temporary fix was to patch rails/lib/commands.console.rb itself: --- console.rb.old 2008-05-26 14:12:00.000000000 +0300 +++ console.rb 2008-05-26 14:12:00.000000000 +0300 @@ -8,6 +8,7 @@ opt.on("--irb=[#{irb}]", 'Invoke a different irb.') { |v| options[:irb] = v } opt.parse!(ARGV) end +options[:irb] = options[:irb].gsub(/^irb\s/, 'irb.bat ') libs = " -r irb/completion" libs << %( -r "#{RAILS_ROOT}/config/environment")
Created attachment 62540 [details] patch
Thanks vits for that info, very helpful. I attached a patch for this in case anybody who is using Windows and building from sources would like to give it a try. In any case I'll test it myself too before M1.
Fixed, the final patch is a bit different than the attached one. Changeset #1365b293fe8e. .
Integrated into 'main-golden', available in NB_Trunk_Production #272 build Changeset: http://hg.netbeans.org/main/rev/1365b293fe8e User: Erno Mononen <emononen@netbeans.org> Log: #133066: Rails Console does not work in Windows using MRI.
*** Issue 139808 has been marked as a duplicate of this issue. ***