Hi. There is a typo, the correct is Module MyCar

and try doing this: require './mycar/car'
On Sun, Sep 23, 2012 at 6:29 PM, S Ahmed wrote:

I have a simple require call that is failing with:

ruby mycar.rb
/Users/me/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': cannot load such file -- mycar/car (LoadError)
from
/Users/me/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from mycar.rb:1:in `<main>'

My file layout is:

mycar.rb
mycar/car.rb

mycar.rb looks like:

require 'mycar/car'



car.rb looks like:

modle MyCar
class Car
end
end


Why isn't this working, getting frustrated :(

--
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@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 11 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 23, '12 at 9:30p
activeSep 24, '12 at 2:16a
posts11
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase