I have updated a project under development to Rails 2.0.2. This project
used Goldberg as its frontend and I have updated that gem to 2.0.2 which
supports Rails 2. On MS Windows XP everything works. However, updating
a Linux host (CentOS-5.1 Ruby 1.8.5) results in this error:
$ ruby script/generate goldberg install
environment.rb 2.0.2
*******************************************************************
* config.breakpoint_server has been deprecated and has no effect.
-
*******************************************************************
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in
load_missing_constant': uninitialized constant Goldberg::Model (NameError) from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in
const_missing’
from
/home/byrnejb/Software/Development/Projects/theheart/vendor/plugins/goldberg/app/models/goldberg/system_settings.rb:4
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
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
new_constants_in’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
require' from /home/byrnejb/Software/Development/Projects/theheart/vendor/plugins/goldberg/lib/goldberg_filters.rb:2 ... 22 levels... from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/generate.rb:1 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 script/generate:3
Looking at custom_require.rb we see:
23 # The normal <tt>require</tt> functionality of returning false
if
24 # that file has already been loaded is preserved.
25 #
26 def require(path) # :nodoc:
27 gem_original_require path
28 rescue LoadError => load_error
29 if load_error.message =~ /\A[Nn]o such file to load –
#{Regexp.esca pe path}\z/ and
30 spec = Gem.searcher.find(path) then
31 Gem.activate(spec.name, false, “= #{spec.version}”)
32 gem_original_require path
33 else
34 raise load_error
35 end
36 end
This looks like some path or another is not being searched. How can I
tell what part of the environment needs to be tweaked to get this to
work?