Hey,
I have this in my environment.rb file for requiring gems
require ''action_mailer''
require ''sentry''
require ''money''
require ''active_merchant''
require ''pdf/writer''
require ''pdf/simpletable''
require ''csv''
require ''tzinfo/timezone''
require ''TzForSelect''
require ''encryption''
require ''rexml/document''
require ''rubygems''
require ''RMagick''
require ''scoped_access''
But when i do a clean install of my pc, i need to install these gems
again. Sometimes i forget that :p And i get the project doesnt want to
start. So i want something like this if it is possible. For each gem
btw...
try
require ''sentry''
catch
put "The sentry gem must be installed"
end
I dont know the code for this, and if it is even possible??
Can somebody help me?
Thx
N.
--
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
-~----------~----~----~----~------~----~------~--~---
Try: begin require "lib" rescue LoadError logger.error "lib gem must be installed" end Another solution is to put all your installed gems in your vendor directory. On 10/22/06, Nick Brutyn <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hey, > > I have this in my environment.rb file for requiring gems > > require ''action_mailer'' > require ''sentry'' > require ''money'' > require ''active_merchant'' > require ''pdf/writer'' > require ''pdf/simpletable'' > require ''csv'' > require ''tzinfo/timezone'' > require ''TzForSelect'' > require ''encryption'' > require ''rexml/document'' > require ''rubygems'' > require ''RMagick'' > require ''scoped_access'' > > But when i do a clean install of my pc, i need to install these gems > again. Sometimes i forget that :p And i get the project doesnt want to > start. So i want something like this if it is possible. For each gem > btw... > > try > require ''sentry'' > catch > put "The sentry gem must be installed" > end > > I dont know the code for this, and if it is even possible?? > > Can somebody help me? > > Thx > N. > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Bruno Celeste wrote:> Try: > > begin > require "lib" > rescue LoadError > logger.error "lib gem must be installed" > end > > Another solution is to put all your installed gems in your vendor > directory.It worked! Thx. ;) -- 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 -~----------~----~----~----~------~----~------~--~---