Hi, I would like to implement a PDF function into my application. I have already installed the pdf-writer-1.1.6. Firstly, there are several folders in this zip folder e.g. pdf, writer etc. Where exactly should I paste this folders to? Secondly, I added the following codes to the environment.rb: require ''pdf/writer'' Mime:Type.register ''application/pdf'',:pdf Where should I place these codes and the should the word "application" be replaced with my project''s name? I am sure that there is something wrong with the codes in here as when i restarted WEBRICK in my command prompt, some of the errors that occurred are: - already initialized constant OPTIONS -no such file to load -- transaction/simple<MissingSourceFile> Can someone please give me a solution? Because there is no way I can implement the codes if I cannot start my WEBrick successfully. This is quite urgent as the deadline is drawing nearer. Please help! Thank you very much!!! -- 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 -~----------~----~----~----~------~----~------~--~---
Hi 1. Where exactly should I paste this folders to? I would place them into the vendor directory or you can install the library directly with gems so you don''t have to put the library into your projects folder. 2. Secondly, I added the following codes to the environment.rb: require ''pdf/writer'' Mime:Type.register ''application/pdf'',:pdf You should place "require ''pdf/writer''" into the main application controller (application.rb) or only in those controllers, wich realy need the library. And "Mime:Type.register ''application/pdf'',:pdf" is misspelled. The correct syntax is Mime::Type.register ''application/pdf'',:pdf and should be placed in config/initializers/mime_types.rb (there are also some examples in this file). Valerie Loy wrote:> Hi, > > I would like to implement a PDF function into my application. > I have already installed the pdf-writer-1.1.6. > > Firstly, there are several folders in this zip folder e.g. pdf, writer > etc. > Where exactly should I paste this folders to? > > Secondly, I added the following codes to the environment.rb: > require ''pdf/writer'' > Mime:Type.register ''application/pdf'',:pdf > > Where should I place these codes and the should the word "application" > be replaced with my project''s name? > I am sure that there is something wrong with the codes in here as when i > restarted WEBRICK in my command prompt, some of the errors that occurred > are: > - already initialized constant OPTIONS > -no such file to load -- transaction/simple<MissingSourceFile> > > Can someone please give me a solution? Because there is no way I can > implement the codes if I cannot start my WEBrick successfully. > This is quite urgent as the deadline is drawing nearer. Please help! > Thank you very much!!! > -- > 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 -~----------~----~----~----~------~----~------~--~---
Ryan''s podcast may help - http://railscasts.com/episodes/78 On Dec 12, 4:03 am, Valerie Loy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I would like to implement a PDF function into my application. > I have already installed the pdf-writer-1.1.6. > > Firstly, there are several folders in this zip folder e.g. pdf, writer > etc. > Where exactly should I paste this folders to? > > Secondly, I added the following codes to the environment.rb: > require ''pdf/writer'' > Mime:Type.register ''application/pdf'',:pdf > > Where should I place these codes and the should the word "application" > be replaced with my project''s name? > I am sure that there is something wrong with the codes in here as when i > restarted WEBRICK in my command prompt, some of the errors that occurred > are: > - already initialized constant OPTIONS > -no such file to load -- transaction/simple<MissingSourceFile> > > Can someone please give me a solution? Because there is no way I can > implement the codes if I cannot start my WEBrick successfully. > This is quite urgent as the deadline is drawing nearer. Please help! > Thank you very much!!! > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
On Dec 12, 2007 4:03 AM, Valerie Loy <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > I would like to implement a PDF function into my application. > I have already installed the pdf-writer-1.1.6. > > Firstly, there are several folders in this zip folder e.g. pdf, writer > etc. > Where exactly should I paste this folders to? > > Secondly, I added the following codes to the environment.rb: > require ''pdf/writer'' > Mime:Type.register ''application/pdf'',:pdf > > Where should I place these codes and the should the word "application" > be replaced with my project''s name? > I am sure that there is something wrong with the codes in here as when i > restarted WEBRICK in my command prompt, some of the errors that occurred > are: > - already initialized constant OPTIONS > -no such file to load -- transaction/simple<MissingSourceFile> >It looks like the transaction-simple gem might be missing. gem install transaction-simple Michael Guterl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---