Rails 1.2.6 on Fedora (development)
This works…
$ pwd
/home/storage/users/craig/svn/th-db/branches/phase5
script/console
Loading development environment.
ThCalsController.get_calendars
=> nil
(which is a satisfactory result actually)
but this fails…
$ /usr/bin/ruby
/home/storage/users/craig/svn/th-db/branches/phase5/script/runner
-e development ThCalsController.get_calendars
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/runner.rb:47:
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:266:in
`load_missing_constant’: uninitialized constant ApplicationController
(NameError)
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:452:in
`const_missing’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:464:in
`const_missing’
from
/home/storage/users/craig/svn/th-db/branches/phase5/app/controllers/th_cals_controller.rb:1
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:203:in
`load_without_new_constant_marking’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:203:in
`load_file’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in
`new_constants_in’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:202:in
`load_file’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:94:in
`require_or_load’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:248:in
`load_missing_constant’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:452:in
`const_missing’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:464:in
`const_missing’
from (eval):1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `eval’
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/runner.rb:47
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
from /home/storage/users/craig/svn/th-db/branches/phase5/script/runner:3
Why the error on ApplicationController?
Craig