Bojan Mihelac
2006-Dec-14 08:41 UTC
Using RedCloth 3.0.3. Rails when RedCloth 3.0.4. exists
Hi all, I am trying to use RedCloth 3.0.3. on shared host but when I put direction to include this version in enviroment.rb: require ''rubygems'' require_gem ''RedCloth'', ''= 3.0.3'' I receive error: /usr/lib/site_ruby/1.8/rubygems.rb:149:in `activate'': can''t activate RedCloth (= 3.0.3), already activated RedCloth 3.0.4. Exception). When I put this commands in boot.rb instead, it works, but it say that boot.rb should not use for configuration... so the question is where requiring should occur and if there is better way to do this? (nistalling 3.0.4 is not an option) thanks for answer in advance, Bojan -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com -> tools, scripts, tricks from our code lab: http://source.mihelac.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2006-Dec-14 09:28 UTC
Re: Using RedCloth 3.0.3. Rails when RedCloth 3.0.4. exists
Hi, you may need to freeze rails as well as non-rails gems locally before upload to your shared host. This simply recreates your local configuration onto the remote host and I believe this is the recommended way of doing things in this situation. Good luck, -Conrad On 12/14/06, Bojan Mihelac <lists-3SxN1WY3PMJAfugRpC6u6w@public.gmane.org> wrote:> > Hi all, > I am trying to use RedCloth 3.0.3. on shared host but when I put > direction to include this version in enviroment.rb: > require ''rubygems'' > require_gem ''RedCloth'', ''= 3.0.3'' > > I receive error: /usr/lib/site_ruby/1.8/rubygems.rb:149:in `activate'': > can''t activate RedCloth (= 3.0.3), already activated RedCloth 3.0.4. > Exception). > > When I put this commands in boot.rb instead, it works, but it say that > boot.rb should not use for configuration... so the question is where > requiring should occur and if there is better way to do this? > (nistalling 3.0.4 is not an option) > > thanks for answer in advance, > Bojan > > > -- > Bojan Mihelac > Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com > -> tools, scripts, tricks from our code lab: http://source.mihelac.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Bojan Mihelac
2006-Dec-14 09:50 UTC
Re: Using RedCloth 3.0.3. Rails when RedCloth 3.0.4. exists
Thanks Conrad, but what if I have both versions of RedCloth on local machine as well? there should be way to specify which RedCloth Rails should use, shouldn''t it? Bojan Conrad Taylor wrote:> Hi, you may need to freeze rails as well as non-rails gems locally > before upload to your shared host. This simply recreates your local > configuration onto the remote host and I believe this is the > recommended way of doing things in this situation. > > Good luck, > > -Conrad > > > > On 12/14/06, Bojan Mihelac <lists-3SxN1WY3PMJAfugRpC6u6w@public.gmane.org> wrote: >> Hi all, >> I am trying to use RedCloth 3.0.3. on shared host but when I put >> direction to include this version in enviroment.rb: >> require ''rubygems'' >> require_gem ''RedCloth'', ''= 3.0.3'' >> >> I receive error: /usr/lib/site_ruby/1.8/rubygems.rb:149:in `activate'': >> can''t activate RedCloth (= 3.0.3), already activated RedCloth 3.0.4. >> Exception). >> >> When I put this commands in boot.rb instead, it works, but it say that >> boot.rb should not use for configuration... so the question is where >> requiring should occur and if there is better way to do this? >> (nistalling 3.0.4 is not an option) >> >> thanks for answer in advance, >> Bojan >> >> >> -- >> Bojan Mihelac >> Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com >> -> tools, scripts, tricks from our code lab: http://source.mihelac.org >> > > > > > >-- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com -> tools, scripts, tricks from our code lab: http://source.mihelac.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Russell Norris
2006-Dec-14 18:50 UTC
Re: Using RedCloth 3.0.3. Rails when RedCloth 3.0.4. exists
I''ve run across this problem myself and found that [for my setup at least] requiring "redcloth" in config/environment.rb BEFORE the Rails Initializer block loads the correct, specified version. Rails loads RedCloth on its own in the initialization block so unless you do it before then you''re stuck with the Rails version. Most of the time it''s not a problem so I wouldn''t call it a bug really. Just undocumented. RSL On 12/14/06, Bojan Mihelac <lists-3SxN1WY3PMJAfugRpC6u6w@public.gmane.org> wrote:> > > Thanks Conrad, > but what if I have both versions of RedCloth on local machine as well? > there should be way to specify which RedCloth Rails should use, > shouldn''t it? > > Bojan > > Conrad Taylor wrote: > > Hi, you may need to freeze rails as well as non-rails gems locally > > before upload to your shared host. This simply recreates your local > > configuration onto the remote host and I believe this is the > > recommended way of doing things in this situation. > > > > Good luck, > > > > -Conrad > > > > > > > > On 12/14/06, Bojan Mihelac <lists-3SxN1WY3PMJAfugRpC6u6w@public.gmane.org> wrote: > >> Hi all, > >> I am trying to use RedCloth 3.0.3. on shared host but when I put > >> direction to include this version in enviroment.rb: > >> require ''rubygems'' > >> require_gem ''RedCloth'', ''= 3.0.3'' > >> > >> I receive error: /usr/lib/site_ruby/1.8/rubygems.rb:149:in `activate'': > >> can''t activate RedCloth (= 3.0.3), already activated RedCloth 3.0.4. > >> Exception). > >> > >> When I put this commands in boot.rb instead, it works, but it say that > >> boot.rb should not use for configuration... so the question is where > >> requiring should occur and if there is better way to do this? > >> (nistalling 3.0.4 is not an option) > >> > >> thanks for answer in advance, > >> Bojan > >> > >> > >> -- > >> Bojan Mihelac > >> Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com > >> -> tools, scripts, tricks from our code lab: http://source.mihelac.org > >> > > > > > > > > > > > > > > -- > Bojan Mihelac > Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com > -> tools, scripts, tricks from our code lab: http://source.mihelac.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Johannes Held
2007-Jan-06 12:33 UTC
Re: Using RedCloth 3.0.3. Rails when RedCloth 3.0.4. exists
Russell Norris wrote:> I''ve run across this problem myself and found that [for my setup at > least] > requiring "redcloth" in config/environment.rb BEFORE the Rails > Initializer > block loads the correct, specified version. Rails loads RedCloth on its > own > in the initialization block so unless you do it before then you''re stuck > with the Rails version. Most of the time it''s not a problem so I > wouldn''t > call it a bug really. Just undocumented. > > RSLHello, I have the exact problem here - but requiring the gem before the initialization block doesn''t work here. Even if I write require_gem ''RedCloth'', ''3.0.3'' as the first line of environment.rb (even before setting the RAILS_GEM_VERSION), I get this error: script/server webrick => Booting WEBrick... /usr/lib/ruby/site_ruby/1.8/rubygems.rb:196:in `activate'': can''t activate RedCloth (= 3.0.3), already activated RedCloth-3.0.4] (Gem::Exception) from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:66:in `active_gem_with_options'' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:59:in `require_gem'' from ./script/../config/../config/environment.rb:1 .... why? Johannes Held -- 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 -~----------~----~----~----~------~----~------~--~---