My understanding is that Textmate is running it with pwd being rails_root (and you're running it from rails_root yourself in the console. It should all work fine unless you cd to a different directory ...
On Wed, Dec 23, 2009 at 2:04 PM, Julio Cesar Ody <[email protected]> wrote: > My guess: Textmate is adding Rails.root to the load path. > > And now I can get my "no shit sherlock" award. > > > On Wed, Dec 23, 2009 at 2:01 PM, Pat Allan <[email protected]> > wrote: > > I'm a bit bemused by all this, because I just write the following, and it > works in TextMate and from the shell: > > > > require 'spec/spec_helper' > > > > I suspect it might not be 1.9.2-friendly, and I admit I've not invested > any time in truly understanding any of this :) > > > > -- > > Pat > > > > On 23/12/2009, at 1:53 PM, Chris Lloyd wrote: > > > >> 2009/12/23 Josh Price <[email protected]> > >> That would be *awesome*. > >> > >> Here's an early Christmas present. > >> > >> module Kernel > >> alias :plain_require :require > >> > >> def require(file) > >> if file.is_a?(String) > >> plain_require > File.expand_path(File.join(File.dirname(caller.first.split(':').first), > file)) > >> else > >> plain_require file.to_s > >> end > >> end > >> end > >> > >> require '../spec_helper' > >> > >> Though it's totally unusable because every other library depends on > require searching the load path. Just please don't give it back to me next > year. > >> > >> Chris > >> > >> -- > >> chrislloyd.com.au > >> > >> -- > >> > >> You received this message because you are subscribed to the Google > Groups "Ruby or Rails Oceania" group. > >> To post to this group, send email to [email protected]. > >> To unsubscribe from this group, send email to > [email protected]<rails-oceania%[email protected]> > . > >> For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > > > > -- > > > > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<rails-oceania%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > > > > > > > > > > -- > -- > http://crazyhollywood.org > > -- > > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rails-oceania%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > > > -- cheers, David Lee -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
