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?


[email protected]:~/ruby/dwemthys$
[email protected]:~/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>'
[email protected]:~/ruby/dwemthys$
[email protected]:~/ruby/dwemthys$ cat creatures.rb
require 'rubygems'
require 'Creature'

[email protected]:~/ruby/dwemthys$
[email protected]:~/ruby/dwemthys$ cat Creature.rb
require 'rubygems'
require 'active_record'

class Creature < ActiveRecord::Base

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

end
[email protected]:~/ruby/dwemthys$
[email protected]:~/ruby/dwemthys$ which ruby
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
[email protected]:~/ruby/dwemthys$
[email protected]:~/ruby/dwemthys$ which gem
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/bin/gem
[email protected]:~/ruby/dwemthys$
[email protected]:~/ruby/dwemthys$ rvm --version

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

[email protected]:~/ruby/dwemthys$
[email protected]:~/ruby/dwemthys$ type rvm | head -1
rvm is a function
[email protected]:~/ruby/dwemthys$
[email protected]:~/ruby/dwemthys$



thanks,

Thufir
 
Ad

Advertisements


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

Top