I love Rails, but I''m beginning to think that there are some very broken things about it. Case in point: - I''m on OS X, and at some point added rails using MacPorts, putting most of my gems in /opt/local/lib/ruby/gems/1.8 - when I add gems, they are added in that directory BUT - when I run (eg) rake tasks, the gems are not found. I''ve tried using ENV[''GEM_PATH''] = ''/opt/local/lib/ruby/gems/1.8'' to force the app to only look there, but it still doesn''t see them. I get messages like Missing these required gems: rmagick authlogic You''re running: ruby 1.8.7.174 at /System/Library/Frameworks/Ruby.framework/Versions/ 1.8/usr/bin/ruby rubygems 1.3.5 at /opt/local/lib/ruby/gems/1.8, /Library/Ruby/Gems/ 1.8 Run `rake gems:install` to install the missing gems. Which I do, using sudo, and everything seems to go fine, but when I run rake again, they aren''t seen. Where am I going wrong? What is wrong with Rails that this can''t be configured simply? What is wrong with me that I can''t figure this out? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Oct 5, 7:39 pm, omnivore <danfdonald...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I love Rails, but I''m beginning to think that there are some very > broken things about it. Case in point: > > - I''m on OS X, and at some point added rails using MacPorts, putting > most of my gems in /opt/local/lib/ruby/gems/1.8 > > - when I add gems, they are added in that directory BUT > > - when I run (eg) rake tasks, the gems are not found. I''ve tried > using > > ENV[''GEM_PATH''] = ''/opt/local/lib/ruby/gems/1.8'' > > to force the app to only look there, but it still doesn''t see them. I > get messages like > > Missing these required gems: > rmagick > authlogic > > You''re running: > ruby 1.8.7.174 at /System/Library/Frameworks/Ruby.framework/Versions/ > 1.8/usr/bin/ruby > rubygems 1.3.5 at /opt/local/lib/ruby/gems/1.8, /Library/Ruby/Gems/ > 1.8 > > Run `rake gems:install` to install the missing gems. > > Which I do, using sudo, and everything seems to go fine, but when I > run rake again, they aren''t seen. > > Where am I going wrong? What is wrong with Rails that this can''t be > configured simply? What is wrong with me that I can''t figure this out?You have 2 ruby installs (one in /opt and one in /lib) and you are installing gems into one install but then running rake from the other one. You could either get rid of one of the installs or make sure that your /opt ruby has rake installed and that $PATH is such that ruby/ rake/gem are all picked from the same ruby install. 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
omnivore wrote:> I love Rails, but I''m beginning to think that there are some very > broken things about it.[...] As Fred said, Rails isn''t broken. Your Ruby installation is. Next time, ask for help without creating FUD. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Solution was simple, once I found it. Change the bang line in the rake.rb, found via ''which rake'' to point to the ruby version that houses the gems. Now things work. Put differently, now its not broken. The breakage came as a result of Rails using the $PATH variable when installing gems, not when it runs rake. So, yes, rails is broken in this case – this underdocumented behaviour arose not out of misconfiguration, but the normal use of the $PATH producing a non-functional behaviour. Next time, feel free to provide an actual answer, or refrain from answering if the best contribution is limited to patronizing snark. BTW, are you wearing shoes these days? Don''t want to hurt your feet when you''re Morris Dancing Ze''ev. Or should I call you Lord Marnen of Wolfhurst? heheheh. On Oct 5, 5:22 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> omnivore wrote: > > I love Rails, but I''m beginning to think that there are some very > > broken things about it. > > [...] > > As Fred said, Rails isn''t broken. Your Ruby installation is. Next > time, ask for help without creating FUD. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 October 2010 02:08, omnivore <danfdonaldson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Solution was simple, once I found it. Change the bang line in the > rake.rb, found via ''which rake'' to point to the ruby version that > houses the gems. Now things work.Don''t bother thanking anyone for pointing you at the cause of the problem. They are only in it for the money anyway. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin, I naturally did send Frederick Cheung (hope I have the name right) thanks directly, although his answer did not actually solve the problem, and reiterated advice that I also found on (IIRC) stackoverflow. He did clue me in to checking the locations of ruby, rake and gems, and I found another clue on another site, where a similar problem was documented. Of course, I thanked that person profusely. I think that''s pretty much adequate, and if anyone here had solved the problem, of course I would have thanked them. I understand quite clearly how these exchanges work. The point of my last post was that one respondent seemed more focussed on topics irrelevant to my question, made remarks that were gratuitously judgmental, and what he contributed was unhelpful to others with a similar problem. Signal to noise is important, is it not? Other than that – and with no desire to extend this uneccesarily – what point of etiquette did I miss, in your opinion? On Oct 6, 2:56 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 6 October 2010 02:08, omnivore <danfdonald...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Solution was simple, once I found it. Change the bang line in the > > rake.rb, found via ''which rake'' to point to the ruby version that > > houses the gems. Now things work. > > Don''t bother thanking anyone for pointing you at the cause of the > problem. They are only in it for the money anyway. > > Colin-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.