Hi, For my app i need to generate pdf file for reports. I am trying the railspdf plugin, got it installed using command: ruby script/plugin install svn://rubyforge.org//var/svn/railspdfplugin/railspdf/ The problem is that when i re-started my webrick it won''t run, with errors messages like this (shown only first message): *D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib/active_suppo rt/dependencies.rb:200:in `const_missing'': uninitialized constant UserEngine (Na meError)* *--etc---* ** I am using latest preview of InstantRails, with login_engine and user_engine installed. Seems that Railspdf plugin has confilct with user_engine plugin. But when i deleted the railspdf directory in /vendor/plugins and started webrick, it run without any problems. I am thinking that i am missing something in configuring railspdf plugin (maybe some settingin environment.rb ?) . Any clues ? Thanks. Heru -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20051231/cb2492cf/attachment.html
On 12/30/05, Heru Yuwono <heru.yuwono@gmail.com> wrote:> I am using latest preview of InstantRails, with login_engine and user_engine > installed. Seems that Railspdf plugin has confilct with user_engine plugin. > But when i deleted the railspdf directory in /vendor/plugins and started > webrick, it run without any problems.Do you have PDF::Writer installed?
Yes, i do, using gem install pdf-writer. i followed this article: http://www.artima.com/rubycs/articles/pdf_writerP.html and it worked fine. On 12/31/05, Josh Charles <josh.charles@gmail.com> wrote:> > On 12/30/05, Heru Yuwono <heru.yuwono@gmail.com> wrote: > > I am using latest preview of InstantRails, with login_engine and > user_engine > > installed. Seems that Railspdf plugin has confilct with user_engine > plugin. > > But when i deleted the railspdf directory in /vendor/plugins and started > > webrick, it run without any problems. > > Do you have PDF::Writer installed? > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20051231/196dbd60/attachment.html
There doesn''t appear to be any code conflict between the Railspdf plugin and the user engine. Can you post the full error message you get? My intutition is suggesting that the Engines plugin itself isn''t being loaded for some reason. - james On 12/31/05, Heru Yuwono <heru.yuwono@gmail.com> wrote:> Yes, i do, using gem install pdf-writer. i followed this article: > > http://www.artima.com/rubycs/articles/pdf_writerP.html > > and it worked fine. > > > > On 12/31/05, Josh Charles <josh.charles@gmail.com> wrote: > > On 12/30/05, Heru Yuwono <heru.yuwono@gmail.com> wrote: > > > I am using latest preview of InstantRails, with login_engine and > user_engine > > > installed. Seems that Railspdf plugin has confilct with user_engine > plugin. > > > But when i deleted the railspdf directory in /vendor/plugins and started > > > webrick, it run without any problems. > > > > Do you have PDF::Writer installed? > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Yes, i am sure it''s not about code conflict, but i guess it''s about my app''s setting or something. My app run perfectly when there''s no ''railspdf'' directory in /vendor/plugins/, both in webrick and apache+scgi. here''s what i got when i run webrick with railspdf installed in /vendor/plugins: D:\InstantRails\rails_apps\production>ruby script/server => Booting WEBrick... D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib/active_suppo rt/dependencies.rb:200:in `const_missing'': uninitialized constant UserEngine (Na meError) from ./script/../config/../app/helpers/application_helper.rb:4 from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib /active_support/dependencies.rb:207:in `load'' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib /active_support/dependencies.rb:207:in `load'' from ./script/../config/../vendor/plugins/engines/lib/dependencies_exten sions.rb:45:in `require_or_load'' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib /active_support/dependencies.rb:22:in `depend_on'' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib /active_support/dependencies.rb:178:in `require_dependency'' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib /active_support/dependencies.rb:178:in `require_dependency'' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib /active_support/dependencies.rb:194:in `const_missing'' ... 23 levels... from D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require .rb:21:in `require__'' from D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require .rb:21:in `require'' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 /lib /active_support/dependencies.rb:214:in `require'' from script/server:3 I have no idea what to do, except deleting ''railspdf'' dir from /vendor/plugins in order to make my app run. Or is there any specific setting in environment.rb ? here''s what i have now: ---cut--- module LoginEngine config :salt, "xxxxx" config :use_email_notification, false end module UserEngine config :admin_login, "admin" config :admin_email, "xxx@xxxxx" config :admin_password, "xxxx" end module Railspdf end Engines.start :login, :user, :railspdf UserEngine.check_system_roles On 12/31/05, James Adam <james.adam@gmail.com> wrote:> > There doesn''t appear to be any code conflict between the Railspdf > plugin and the user engine. Can you post the full error message you > get? > > My intutition is suggesting that the Engines plugin itself isn''t being > loaded for some reason. > > - james > > On 12/31/05, Heru Yuwono <heru.yuwono@gmail.com> wrote: > > Yes, i do, using gem install pdf-writer. i followed this article: > > > > http://www.artima.com/rubycs/articles/pdf_writerP.html > > > > and it worked fine. > > > > > > > > On 12/31/05, Josh Charles <josh.charles@gmail.com> wrote: > > > On 12/30/05, Heru Yuwono <heru.yuwono@gmail.com> wrote: > > > > I am using latest preview of InstantRails, with login_engine and > > user_engine > > > > installed. Seems that Railspdf plugin has confilct with user_engine > > plugin. > > > > But when i deleted the railspdf directory in /vendor/plugins and > started > > > > webrick, it run without any problems. > > > > > > Do you have PDF::Writer installed? > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060102/ed9224a0/attachment.html
Firstly - unless you have made it as such yourself, Railspdf isn''t an engine so having :railspdf in your Engines.start line is at best redundant; I''d remove that for a start. I''m reallly not sure what is causing this problem. I''ve also seen another issue with PDF::Writer which seems to affect ActiveRecord saving and validation... Something very odd is going on here. If you''ve no luck and it''s possible (i.e. you''re happy for me to see your code), send me an archive of your application and I''ll try and replicate this. - james On 1/2/06, Heru Yuwono <heru.yuwono@gmail.com> wrote:> Yes, i am sure it''s not about code conflict, but i guess it''s about my app''s > setting or something. My app run perfectly when there''s no ''railspdf'' > directory in /vendor/plugins/, both in webrick and apache+scgi. here''s what > i got when i run webrick with railspdf installed in /vendor/plugins: > > D:\InstantRails\rails_apps\production>ruby script/server > => Booting WEBrick... > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_suppo > rt/dependencies.rb:200:in `const_missing'': uninitialized constant UserEngine > (Na > meError) > from > ./script/../config/../app/helpers/application_helper.rb:4 > from > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > /active_support/dependencies.rb:207:in `load'' > from > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > /active_support/dependencies.rb:207:in `load'' > from > ./script/../config/../vendor/plugins/engines/lib/dependencies_exten > sions.rb :45:in `require_or_load'' > from > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > /active_support/dependencies.rb:22:in `depend_on'' > from > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport- > 1.2.5/lib > /active_support/dependencies.rb:178:in `require_dependency'' > from > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > /active_support/dependencies.rb:178:in `require_dependency'' > from > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > /active_support/dependencies.rb:194:in `const_missing'' > ... 23 levels... > from > D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require > .rb:21:in `require__'' > from > D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require > .rb:21:in `require'' > from > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > /active_support/dependencies.rb:214:in `require'' > from script/server:3 > > I have no idea what to do, except deleting ''railspdf'' dir from > /vendor/plugins in order to make my app run. Or is there any specific > setting in environment.rb ? here''s what i have now: > > ---cut--- > > > module LoginEngine > config :salt, "xxxxx" > config :use_email_notification, false > end > > module UserEngine > config :admin_login, "admin" > config :admin_email, "xxx@xxxxx" > config :admin_password, "xxxx" > end > > module Railspdf > > end > > Engines.start :login, :user, :railspdf > UserEngine.check_system_roles > > > On 12/31/05, James Adam <james.adam@gmail.com> wrote: > > > > There doesn''t appear to be any code conflict between the Railspdf > > plugin and the user engine. Can you post the full error message you > > get? > > > > My intutition is suggesting that the Engines plugin itself isn''t being > > loaded for some reason. > > > > - james > > > > On 12/31/05, Heru Yuwono <heru.yuwono@gmail.com > wrote: > > > Yes, i do, using gem install pdf-writer. i followed this article: > > > > > > http://www.artima.com/rubycs/articles/pdf_writerP.html > > > > > > and it worked fine. > > > > > > > > > > > > On 12/31/05, Josh Charles <josh.charles@gmail.com> wrote: > > > > On 12/30/05, Heru Yuwono < heru.yuwono@gmail.com> wrote: > > > > > I am using latest preview of InstantRails, with login_engine and > > > user_engine > > > > > installed. Seems that Railspdf plugin has confilct with user_engine > > > plugin. > > > > > But when i deleted the railspdf directory in /vendor/plugins and > started > > > > > webrick, it run without any problems. > > > > > > > > Do you have PDF::Writer installed? > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
You''re right, I removed :railspdf from Engine.start because it seems doesn''t do anything to my app, but the problem''s still exist.Time is ticking to the deadline, so I can''t do some experiments to find the cause of the problem. What i do now is have htmldoc to convert my nicely-formatted html pages to pdf files and send the files to my app''s user. It works nice, so i''ll stay with this for a while. Thanks for your help. Maybe next time i can do it right :) Heru On 1/2/06, James Adam <james.adam@gmail.com> wrote:> > Firstly - unless you have made it as such yourself, Railspdf isn''t an > engine so having :railspdf in your Engines.start line is at best > redundant; I''d remove that for a start. > > I''m reallly not sure what is causing this problem. I''ve also seen > another issue with PDF::Writer which seems to affect ActiveRecord > saving and validation... Something very odd is going on here. > > If you''ve no luck and it''s possible (i.e. you''re happy for me to see > your code), send me an archive of your application and I''ll try and > replicate this. > > - james > > On 1/2/06, Heru Yuwono <heru.yuwono@gmail.com> wrote: > > Yes, i am sure it''s not about code conflict, but i guess it''s about my > app''s > > setting or something. My app run perfectly when there''s no ''railspdf'' > > directory in /vendor/plugins/, both in webrick and apache+scgi. here''s > what > > i got when i run webrick with railspdf installed in /vendor/plugins: > > > > D:\InstantRails\rails_apps\production>ruby script/server > > => Booting WEBrick... > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5 > /lib/active_suppo > > rt/dependencies.rb:200:in `const_missing'': uninitialized constant > UserEngine > > (Na > > meError) > > from > > ./script/../config/../app/helpers/application_helper.rb:4 > > from > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > > /active_support/dependencies.rb:207:in `load'' > > from > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > > /active_support/dependencies.rb:207:in `load'' > > from > > ./script/../config/../vendor/plugins/engines/lib/dependencies_exten > > sions.rb :45:in `require_or_load'' > > from > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > > /active_support/dependencies.rb:22:in `depend_on'' > > from > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport- > > 1.2.5/lib > > /active_support/dependencies.rb:178:in `require_dependency'' > > from > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > > /active_support/dependencies.rb:178:in `require_dependency'' > > from > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > > /active_support/dependencies.rb:194:in `const_missing'' > > ... 23 levels... > > from > > D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require > > .rb:21:in `require__'' > > from > > D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require > > .rb:21:in `require'' > > from > > D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib > > /active_support/dependencies.rb:214:in `require'' > > from script/server:3 > > > > I have no idea what to do, except deleting ''railspdf'' dir from > > /vendor/plugins in order to make my app run. Or is there any specific > > setting in environment.rb ? here''s what i have now: > > > > ---cut--- > > > > > > module LoginEngine > > config :salt, "xxxxx" > > config :use_email_notification, false > > end > > > > module UserEngine > > config :admin_login, "admin" > > config :admin_email, "xxx@xxxxx" > > config :admin_password, "xxxx" > > end > > > > module Railspdf > > > > end > > > > Engines.start :login, :user, :railspdf > > UserEngine.check_system_roles > > > > > > On 12/31/05, James Adam <james.adam@gmail.com> wrote: > > > > > > There doesn''t appear to be any code conflict between the Railspdf > > > plugin and the user engine. Can you post the full error message you > > > get? > > > > > > My intutition is suggesting that the Engines plugin itself isn''t being > > > loaded for some reason. > > > > > > - james > > > > > > On 12/31/05, Heru Yuwono <heru.yuwono@gmail.com > wrote: > > > > Yes, i do, using gem install pdf-writer. i followed this article: > > > > > > > > http://www.artima.com/rubycs/articles/pdf_writerP.html > > > > > > > > and it worked fine. > > > > > > > > > > > > > > > > On 12/31/05, Josh Charles <josh.charles@gmail.com> wrote: > > > > > On 12/30/05, Heru Yuwono < heru.yuwono@gmail.com> wrote: > > > > > > I am using latest preview of InstantRails, with login_engine and > > > > user_engine > > > > > > installed. Seems that Railspdf plugin has confilct with > user_engine > > > > plugin. > > > > > > But when i deleted the railspdf directory in /vendor/plugins and > > started > > > > > > webrick, it run without any problems. > > > > > > > > > > Do you have PDF::Writer installed? > > > > > _______________________________________________ > > > > > Rails mailing list > > > > > Rails@lists.rubyonrails.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060103/fa47b2f7/attachment.html
> On 1/2/06, James Adam <james.adam@gmail.com> wrote: > > Firstly - unless you have made it as such yourself, Railspdf isn''t an > > engine so having :railspdf in your Engines.start line is at best > > redundant; I''d remove that for a start. > > > > I''m reallly not sure what is causing this problem. I''ve also seen > > another issue with PDF::Writer which seems to affect ActiveRecord > > saving and validation... Something very odd is going on here.For what it''s worth, this is probably *not* a PDF::Writer issue affecting ActiveRecord. It is probably ActiveRecord doing something it shouldn''t be with Transaction::Simple, as the one person who had posted about this in the past suggested that when they removed Transaction::Simple (a very old version of it) from the ActiveRecord vendor/ directory, things just worked. I posted about this to the rails list prior to 1.0, but it seemed not to have been noticed, but ActiveRecord uses an extremely old version of Transaction::Simple and there are a couple of known bugs in it as well as several neat new features in the latest version. PDF::Writer requires the latest version of Transaction::Simple. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca
My initial explorations into this problem support what Austin is suggesting - commenting out the inclusion of Transaction::Simple resolved the issues with AR objects. - james On 1/3/06, Austin Ziegler <halostatue@gmail.com> wrote:> For what it''s worth, this is probably *not* a PDF::Writer issue > affecting ActiveRecord. It is probably ActiveRecord doing something it > shouldn''t be with Transaction::Simple, as the one person who had > posted about this in the past suggested that when they removed > Transaction::Simple (a very old version of it) from the ActiveRecord > vendor/ directory, things just worked. > > I posted about this to the rails list prior to 1.0, but it seemed not > to have been noticed, but ActiveRecord uses an extremely old version > of Transaction::Simple and there are a couple of known bugs in it as > well as several neat new features in the latest version. PDF::Writer > requires the latest version of Transaction::Simple. > > -austin > -- > Austin Ziegler * halostatue@gmail.com > * Alternate: austin@halostatue.ca > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
James Adam wrote:> My initial explorations into this problem support what Austin is > suggesting - commenting out the inclusion of Transaction::Simple > resolved the issues with AR objects. > > - jamesWhat you have been saying seems to make sense, but I''m having a quite strange problem pertaining to this issue that I would like to run by you gurus... On my local machine, I have been able to get things working by commenting out the line that requires Transaction::Simple. It also seems to be working on my remote (production) machine... ...for a while!! It works when I have just restarted the fastcgi-processes, but stops working again after a while! I have tried it several times, and it''s the same over and over. Works for a while, then not. I have different versions of Rails running on the local development server vs the production server, but I have freezed rails on both machines to the same version. The production server is a linux server running Rails through Apache and fastcgi. On the local machine I have tried with both webrick and mongrel, and everything seems to be working fine there. Also, the only place where I get the problem is when doing a user signup via login_engine. The error I get is that it can''t send the activation email due to an argument error: "wrong number of arguments (0 for 1) (ArgumentError)". Everything else seems to be working fine, including using PDFWriter to create pdf''s. Any ideas? /Jonathan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Seemingly Similar Threads
- UserEngine - rake bootstrap aborted
- UserEngine - rake bootstrap aborted => undefined method `synchronize_with_controllers'' for Permission:Class
- UserEngine -- Permission.synchronize_with_controllers -- trouble with my own controller modules
- Re: How to Password Protect a Controller
- UserEngine: stack level too deep