cannot load file Creature.rb

T

thufir

Am I using require incorrectly? Or doing my gems wrong? Why won't
creatures.rb load Creature.rb?


thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ ruby creatures.rb
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/
rubygems/custom_require.rb:36:in `require': cannot load such file --
Creature (LoadError)
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/
site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from creatures.rb:2:in `<main>'
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ cat creatures.rb
require 'rubygems'
require 'Creature'

thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ cat Creature.rb
require 'rubygems'
require 'active_record'

class Creature < ActiveRecord::Base

attr_accessor :life, :strength, :charisma, :weapon

end
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ which ruby
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ which gem
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/bin/gem
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ rvm --version

rvm 1.10.3 by Wayne E. Seguin <[email protected]>, Michal Papis
<[email protected]> [https://rvm.beginrescueend.com/]

thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ type rvm | head -1
rvm is a function
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$



thanks,

Thufir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top