Forum: Ruby on Rails Script/Server working but Script/Console not working

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Vinay (Guest)
on 2008-10-25 08:32
(Received via mailing list)
Hi all,
I have been having a very weird problem for a few weeks. I am able to
start up the server using "script/server" for my application and run
it successfully but "script/console" is not working. I have been
managing without it but somethings not right and i need to fix it.
This is the error that it throws and the trace.
Loading development environment (Rails 2.1.0)
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- application
(MissingSourceFile)
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`require'
  from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:509:in `require'
  from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:354:in `new_constants_in'
  from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:509:in `require'
  from /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/
console_with_helpers.rb:19
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`require'
  from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:509:in `require'
  from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:354:in `new_constants_in'
  from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:509:in `require'
  from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/irb/init.rb:253:in `load_modules'
  from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/irb/init.rb:251:in `each'
  from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/irb/init.rb:251:in `load_modules'
  from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/irb/init.rb:21:in `setup'
  from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/irb.rb:54:in `start'
  from /usr/bin/irb:13
I also need the console for some quick debugging and info. Hope
someone can help me figure out what the problem is.
Daniel B. (Guest)
on 2008-10-25 11:40
(Received via mailing list)
On Oct 25, 3:31 pm, Vinay <removed_email_address@domain.invalid> wrote:
> Hi all,
> I have been having a very weird problem for a few weeks. I am able to
> start up the server using "script/server" for my application and run
> it successfully but "script/console" is not working. I have been
> managing without it but somethings not right and i need to fix it.
> This is the error that it throws and the trace.
> Loading development environment (Rails 2.1.0)
> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require': no such file to load -- application
> (MissingSourceFile)

Might be something to do with app/controllers/application.rb.
Do you have it?
It will contain: class ApplicationController < ActionController::Base

--
Daniel B.
Vinay (Guest)
on 2008-10-25 14:33
(Received via mailing list)
@Daniel,
That was it!
I had changed the file name to application_controller.rb because some
helper methods were not available for the views and i thought the name
might've been the problem. And then i had fixed it by using
helper_method. Forgot to change the file name back to application.rb!
thanks Daniel :).
This topic is locked and can not be replied to.