People,
For my old library app I did with Rails 2.1.1, if I use Fedora 16/Ruby
1.8.6, everything is OK. If I copy the app to a Fedora 17/Ruby 1.9.3
setup and reinstall all the old Gems and run:
./script/server
I get:
/usr/share/rubygems/rubygems/custom_require.rb:55:in require': cannot load such file -- test/unit/error (LoadError) from /usr/share/rubygems/rubygems/custom_require.rb:55:in
require’
from
/usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
block in require' from /usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in
new_constants_in’
from
/usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
require' from /usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support/deprecation.rb:204:in
<top (required)>’
from /usr/share/rubygems/rubygems/custom_require.rb:55:in require' from /usr/share/rubygems/rubygems/custom_require.rb:55:in
require’
from
/usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
block in require' from /usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in
new_constants_in’
from
/usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
require' from /usr/local/share/gems/gems/activesupport-2.1.1/lib/active_support.rb:40:in
<top (required)>’
from /usr/share/rubygems/rubygems/custom_require.rb:55:in require' from /usr/share/rubygems/rubygems/custom_require.rb:55:in
require’
from /usr/local/share/gems/gems/rails-2.1.1/lib/commands/server.rb:1:in
<top (required)>' from /usr/share/rubygems/rubygems/custom_require.rb:55:in
require’
from /usr/share/rubygems/rubygems/custom_require.rb:55:in require' from ./script/server:3:in
’
I have found similar problems reported and so have messed around with
the paths in script/server:
#!/usr/bin/env ruby
$: << File.dirname(FILE)
$: << File.dirname(FILE) + ‘…’
$: << File.dirname(FILE) + ‘…/…’
$: << File.join(File.dirname(FILE),’…’)
require File.dirname(FILE) + ‘/…/config/boot’
require File.expand_path(’…/…/config/boot’, FILE)
require File.expand_path(FILE)+’/…/…/config/boot’
APP_PATH = File.expand_path(’…/…/config/application’, FILE)
require File.expand_path(’…/…/config/boot’, FILE)
require ‘rails/commands’
require ‘commands/server’
Any suggestions? (besides writing the app from scratch in the new
environment).
Thanks,
Phil.
–
Philip R.
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: [email protected]