Anyone have this working in rails 2.2.2?

6 views
Skip to first unread message

Barnettech

unread,
Feb 9, 2009, 11:23:11 AM2/9/09
to Ruby on Rails: RFPDF
Here's the error I get, any help would be great:


C:\rails_apps\isis>ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependenci
es.rb:263:in `load_missing_constant': uninitialized constant
ActionView::Templat
e (NameError)
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_suppo
rt/dependencies.rb:453:in `const_missing'
from C:/rails_apps/isis/vendor/plugins/rfpdf/environment.rb:19
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `ge
m_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `re
quire'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_suppo
rt/dependencies.rb:496:in `require'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_suppo
rt/dependencies.rb:342:in `new_constants_in'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_suppo
rt/dependencies.rb:496:in `require'
from C:/rails_apps/isis/vendor/plugins/rfpdf/init.rb:4:in
`evaluate_init
_rb'
... 39 levels...
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/
server.rb:3
9
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `ge
m_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `re
quire'
from script/server:3

C:\rails_apps\isis>rails -v
Rails 2.2.2

Peter Boling

unread,
Feb 9, 2009, 4:20:04 PM2/9/09
to rf...@googlegroups.com
> C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
> dependencies.rb:263:in `load_missing_constant': uninitialized constant
> ActionView::Template (NameError)

Looks like the same error I got when I upgraded from rails 1.2.6 to
rails 2.2.2 and still had some .rhtml and .rjs view files in my
project and plugins. Once I renamed them all to .html.erb and .js.rjs
this type of disappeared mysteriously into the night. I found this
rake task on the web that did most of the renaming for me (sorry,
don't remember where):

namespace :rails do
namespace :views do
desc 'Renames all .rhtml views to .html.erb, .rjs to .js.rjs,
.rxml to .xml.builder, and .haml to .html.haml'
task :rename do
Dir.glob('app/views/**/[^_]*.rhtml').each do |file|
puts `svn mv #{file} #{file.gsub(/\.rhtml$/, '.html.erb')}`
end

Dir.glob('app/views/**/[^_]*.rxml').each do |file|
puts `svn mv #{file} #{file.gsub(/\.rxml$/, '.xml.builder')}`
end

Dir.glob('app/views/**/[^_]*.rjs').each do |file|
puts `svn mv #{file} #{file.gsub(/\.rjs$/, '.js.rjs')}`
end
Dir.glob('app/views/**/[^_]*.haml').each do |file|
puts `svn mv #{file} #{file.gsub(/\.haml$/, '.html.haml')}`
end
end
end
end

It converted almost all my view files, but it did NOT do the partials,
so unless you modify it you'll need to do those by hand.

--
|7eter H. l3oling
-----------------------------------------------------------------
President & Fooby-Ru Wizard | 9thBit LLC | http://peterboling.com/
Legacy Partner | EIRO Research | http://peterboling.ieiro.com
Senior Ruby Developer | Sagebit LLC | http://sagebit.com
Mobile DJ | GalacticDJs
-----------------------------------------------------------------
blog: http://galtzo.blogspot.com/
lang: English, Spanish, Portuguese
-----------------------------------------------------------------
find events in your city at http://cartabuzz.com
find tickets for anything fast at http://monkeystub.com

James Barnett

unread,
Feb 9, 2009, 4:55:39 PM2/9/09
to rf...@googlegroups.com
thank you very much for responding :)  The head of the project by the way emailed me saying he's moved to prawn and prawnto and rfpdf is no longer being supported ...... oy!
Reply all
Reply to author
Forward
0 new messages