Admittedly, this is a massive update into production environment and I
am getting some routing errors that I don’t understand.
from /var/log/httpd/error_log
1 - MissingSourceFile (no such file to load – lib/cmwholename.rb):
2 - ActionController::RoutingError (Recognition failed for
“/javascripts/defaults.js”)
I am using apache 2.0.54.x with fcgi and things had been working fine
before this update.
routes.rb is the same (before/after) and the only modification I have
ever made to routes.rb is to add…
map.connect ‘/’, :controller => “login”, :action => ‘login’
I did add ‘Engines.start :datebocks’ to environment.rb (the only change)
Clearly those files are there…from RAILS_ROOT
ls -l lib public/javascripts/
lib:
total 40
-rw-rw-r-- 1 craig craig 392 Sep 16 16:52 clwholename.rb
-rw-rw-r-- 1 craig craig 397 Sep 16 16:52 cmwholename.rb
-rw-rw-r-- 1 craig craig 393 Sep 16 16:52 pewholename.rb
-rw-rw-r-- 1 craig craig 393 Sep 16 16:52 suwholename.rb
drwxrwxr-x 3 craig craig 4096 Sep 16 16:52 tasks
public/javascripts/:
total 292
-rw-rw-r-- 1 craig craig 148 Sep 16 16:52 application.js
-rw-rw-r-- 1 craig craig 3600 Sep 16 16:52 calendar-en.js
-rw-rw-r-- 1 craig craig 49237 Sep 16 16:52 calendar.js
-rw-rw-r-- 1 craig craig 8853 Sep 16 16:52 calendar-setup.js
-rw-rw-r-- 1 craig craig 28036 Sep 16 16:52 controls.js
-rw-rw-r-- 1 craig craig 29453 Sep 16 16:52 dragdrop.js
-rw-rw-r-- 1 craig craig 32871 Sep 16 16:52 effects.js
-rw-rw-r-- 1 craig craig 55149 Sep 16 16:52 prototype.js
-rw-rw-r-- 1 craig craig 23890 Sep 16 16:52 rico_corner.js
Anyone with a hint?
Craig
This doesn’t make sense…
script/console production
Loading production environment.
require “lib/pewholename.rb”
=> true
@personnel = Personnel.find(135)
=> #<Personnel:0xb780ea14 @attributes={“arbitration_agreement”=>“t”,
“sex”=>“M”
… bunch of stuff clipped …
“confidentiality_of_med_records”=>“f”}>
@personnel.pewholename
=> #<Pewholename:0xb7791c30 @first_name=“Charles”, @last_name=“Atlas”,
@middle_initial=“T”>
So require “lib/pewholename.rb” works from script/console production but
not when used in a model (it generates an error).
And I am still wondering why a layout using
<%= javascript_include_tag :defaults %>
generates the ActionController::RoutingError
and I’m wondering if these problems aren’t related
Craig
On Sat, 2006-09-16 at 17:44 -0700, Craig W. wrote:
Admittedly, this is a massive update into production environment and I
am getting some routing errors that I don’t understand.
from /var/log/httpd/error_log
1 - MissingSourceFile (no such file to load – lib/cmwholename.rb):
This is weird - what works in script/console doesn’t work in my model
and vice versa…
script/console production
Loading production environment.
require “lib/pewholename.rb”
=> true
exit
This is exactly how I have it in my personnel.rb model (require
“lib/pewholename.rb”)
So I changed my model to read (require “…/lib/pewholename.rb”)
and my web application is happy but it doesn’t work in script/console
script/console production
Loading production environment.
require “…/lib/pewholename.rb”
MissingSourceFile: no such file to load – …/lib/pewholename.rb
from /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require’
from (irb):1
I am very confused by what appears to be a lack of consistency and may
in reality be my lack of knowledge here…can anyone clarify for me?
Craig