# Load issues with engines 1.0.5 - also some path problems

**URL:** <https://www.ruby-forum.com/t/load-issues-with-engines-1-0-5-also-some-path-problems/52721>\
**Category:** Engines Development\
**Created:** [January 18, 2006, 11:06am UTC](https://www.ruby-forum.com/t/load-issues-with-engines-1-0-5-also-some-path-problems/52721 "2006-01-18T11:06:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [January 18, 2006, 11:06am UTC](https://www.ruby-forum.com/t/load-issues-with-engines-1-0-5-also-some-path-problems/52721/1 "2006-01-18T11:06:54Z")

</div>

Just upgraded to 1.0.5 from 1.0.2 on my production app. Runs fine here  
in development mode on my test boxes but when I push it to the  
production server I’m getting an 500 error and the log is telling me  
this…

Note that my root directory for the app is  
/home/httpd/vhosts/genselect.com/httpdocs … which is a symlink to  
/home/httpd/vhosts/genselect.com/rails/public

* * *

WARNING: Couldn’t create the engine public file structure for engine  
‘substruct\_engine’; Error follows:  
No such file or directory -  
/home/httpd/vhosts/genselect.com/public/engine\_files (Errno::ENOENT)  
/usr/local/lib/ruby/1.8/fileutils.rb:212:in `mkdir' /usr/local/lib/ruby/1.8/fileutils.rb:212:in`fu\_mkdir’  
/usr/local/lib/ruby/1.8/fileutils.rb:151:in `mkdir' /usr/local/lib/ruby/1.8/fileutils.rb:150:in`each’  
/usr/local/lib/ruby/1.8/fileutils.rb:150:in `mkdir' /home/httpd/vhosts/genselect.com/httpdocs/../config/../vendor/plugins/engines/lib/engines.rb:192:in`copy\_engine\_files’  
/home/httpd/vhosts/genselect.com/httpdocs/…/config/…/vendor/plugins/engines/lib/engines.rb:131:in  
`start_engine' /home/httpd/vhosts/genselect.com/httpdocs/../config/../vendor/plugins/engines/lib/engines.rb:76:in`start’  
/home/httpd/vhosts/genselect.com/httpdocs/…/config/…/vendor/plugins/engines/lib/engines.rb:75:in  
`each' /home/httpd/vhosts/genselect.com/httpdocs/../config/../vendor/plugins/engines/lib/engines.rb:75:in`start’  
/home/httpd/vhosts/genselect.com/httpdocs/…/config/environment.rb:61  
/home/httpd/vhosts/genselect.com/httpdocs/dispatch.fcgi:21:in `require’  
/home/httpd/vhosts/genselect.com/httpdocs/dispatch.fcgi:21  
finally loading from application:  
‘/home/httpd/vhosts/genselect.com/httpdocs/…/config/…/vendor/plugins/substruct/app/controllers/application.rb’  
finally loading from application: ‘login\_system’

Processing Base#index (for 67.169.31.47 at 2006-01-18 01:26:48) [GET]  
Parameters: {}

MissingSourceFile (No such file to load – login\_system):  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
`require__' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:214:in  
`require' /vendor/plugins/engines/lib/dependencies_extensions.rb:73:in`require\_or\_load’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:22:in  
`depend_on' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:178:in`require\_dependency’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:178:in  
`require_dependency' /vendor/plugins/substruct/app/controllers/application.rb:1 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require\_\_’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
`require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in`require’  
/vendor/plugins/engines/lib/dependencies\_extensions.rb:73:in  
`require_or_load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:22:in`depend\_on’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:178:in  
`require_dependency' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:178:in`require\_dependency’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:134:in  
`load_file!' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:97:in`const\_load!’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:80:in  
`each' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:80:in`const\_load!’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:71:in  
`prepare_application' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:37:in`dispatch’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi\_handler.rb:141:in  
`process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in`process!’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi\_handler.rb:52:in  
`each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in`each’  
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in  
`each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in`process!’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi\_handler.rb:22:in  
`process!’  
/home/httpd/vhosts/genselect.com/httpdocs/dispatch.fcgi:24

---

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [January 18, 2006, 11:57am UTC](https://www.ruby-forum.com/t/load-issues-with-engines-1-0-5-also-some-path-problems/52721/2 "2006-01-18T11:57:16Z")

</div>

On 1/18/06, Subimage [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Note that my root directory for the app is  
> /home/httpd/vhosts/genselect.com/httpdocs … which is a symlink to  
> /home/httpd/vhosts/genselect.com/rails/public
> 
> * * *
> 
> WARNING: Couldn’t create the engine public file structure for engine  
> ‘substruct\_engine’; Error follows:  
> No such file or directory -  
> /home/httpd/vhosts/genselect.com/public/engine\_files (Errno::ENOENT)

This path is generated in the method ‘copy\_engine\_files’  
(engines/lib/engines.rb) by:

File.expand\_path(File.join(RAILS\_ROOT, “public”,  
Engines.config(:public\_dir)))

… which indicates that your RAILS\_ROOT is neither of the paths you  
specify at this point… puzzling. Any ideas? I suspect it might be a  
result of the File.expand\_path(). You might play around with calling  
this line of code in a script/console session to see what different  
results you get.

> MissingSourceFile (No such file to load – login\_system):

You’ve probably typed ‘login\_system’ instead of ‘login\_engine’ 🙂 The  
RAILS\_ROOT issue is very weird though.

- james

---

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [January 18, 2006, 7:37pm UTC](https://www.ruby-forum.com/t/load-issues-with-engines-1-0-5-also-some-path-problems/52721/3 "2006-01-18T19:37:04Z")

</div>

I’ll take a look at the path thing. And no, I’ve not typed it  
incorrectly as I’m not using the login\_engine. I’m using my own login  
system at the moment…

Also, the same code works beautifully if I run via webrick on the  
production server in production mode - so it’s something to do with  
Apache/FCGI configuration that’s screwing things up.

> This path is generated in the method ‘copy\_engine\_files’  
> (engines/lib/engines.rb) by:
> 
> File.expand\_path(File.join(RAILS\_ROOT, “public”,  
> Engines.config(:public\_dir)))
> 
> … which indicates that your RAILS\_ROOT is neither of the paths you  
> specify at this point… puzzling. Any ideas? I suspect it might be a  
> result of the File.expand\_path(). You might play around with calling  
> this line of code in a script/console session to see what different  
> results you get.
> 
> > MissingSourceFile (No such file to load – login\_system):
> 
> You’ve probably typed ‘login\_system’ instead of ‘login\_engine’ 🙂 The  
> RAILS\_ROOT issue is very weird though.
> 
> - james
