Ok that made it work, but still doesn't make sense to me, there must be
something else wrong in my environment right?
Also to reference the class, I still needed to prefix the module name which
is also strange because I am requiring it!
Example:
require './mycar/car'
MyCar::Car.new # this work
Why doesn't mine work, very confused??
I've never seen that require in any gems on the web thought?
https://github.com/ryanb/cancan/blob/master/lib/cancan.rb
require 'cancan/ability'
require 'cancan/rule'
require 'cancan/controller_resource'
require 'cancan/controller_additions'
require 'canca
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_requ
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/c
4 matches
Mail list logo