Brian Hartin
2008-May-01 02:17 UTC
Is there a best practice for when an app requires a gem?
Hi there, Is there a standard/recommended way for a Rails app to express a dependency on a gem? For non-rails projects, we could package as a gem and hence use the gem spec to express dependencies. I suppose I could do it by hand in environment.rb, but it seems like there ought to be a cleaner way. Am I missing something? Thanks, Brian Hartin -- 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 -~----------~----~----~----~------~----~------~--~---
Brian Hartin wrote:> Is there a standard/recommended way for a Rails app to express a > dependency on a gem?Try this: The program emits "no such file to load -- foo" The user responds with: sudo gem install foo Problem solved. Just don''t go crazy and call your primary include file ''luxury_yacht'', while your gem is called ''throat_warbler_mangrove''. Name them the same so the error message The rule "same thing same name" is a very important tenant of lean and clean programming. -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-01 02:33 UTC
Re: Is there a best practice for when an app requires a gem?
On 1 May 2008, at 03:17, Brian Hartin wrote:> > Hi there, > > Is there a standard/recommended way for a Rails app to express a > dependency on a gem? For non-rails projects, we could package as a > gem > and hence use the gem spec to express dependencies. > > I suppose I could do it by hand in environment.rb, but it seems like > there ought to be a cleaner way. Am I missing something?http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---