no such file to load -- active_record

T

Thufir

This works fine from my linux box, but no such luck from windows:

C:\code\dwemthys>
C:\code\dwemthys>gem install ActiveRecord
Successfully installed activerecord-2.0.2
Installing ri documentation for activerecord-2.0.2...
Installing RDoc documentation for activerecord-2.0.2...

C:\code\dwemthys>
C:\code\dwemthys>
C:\code\dwemthys>
C:\code\dwemthys>
C:\code\dwemthys>ruby db_crud_create.rb
db_crud_create.rb:2:in `require': no such file to load --
active_record (LoadErr
or)
from db_crud_create.rb:2

C:\code\dwemthys>
C:\code\dwemthys>ver

Microsoft Windows XP [Version 5.1.2600]

C:\code\dwemthys>


Could I do something from the console to figure out what's going on?




thanks,

Thufir
 
T

Thufir

A more complete example:

C:\code\dwemthys>
C:\code\dwemthys>
C:\code\dwemthys>gem search activerecord

*** LOCAL GEMS ***

activerecord (2.0.2, 1.15.6)
Implements the ActiveRecord pattern for ORM.

C:\code\dwemthys>
C:\code\dwemthys>ruby db_crud_create.rb
db_crud_create.rb:1:in `require': no such file to load --
active_record (LoadErr
or)
from db_crud_create.rb:1

C:\code\dwemthys>
C:\code\dwemthys>type db_crud_create.rb
require 'active_record'
require 'fileutils'
require 'creature'
require 'dragon'
require 'instantiate'
include Instantiate


system("rm dwemthys.db")

ActiveRecord::Base.logger = Logger.new(STDERR)
ActiveRecord::Base.colorize_logging = true

ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:dbfile => "dwemthys.db"
)

ActiveRecord::Schema.define do
create_table :creatures do |table|
table.column :type, :string
table.column :life, :integer
table.column :strength, :integer
table.column :charisma, :integer
table.column :weapon, :integer
end
end




99.times do |index|
creature = Instantiate.randomCreature
p creature
creature.save
end

C:\code\dwemthys>


thanks,

Thufir
 
F

Frederick Cheung

*** LOCAL GEMS ***

activerecord (2.0.2, 1.15.6)
Implements the ActiveRecord pattern for ORM.

C:\code\dwemthys>
C:\code\dwemthys>ruby db_crud_create.rb
db_crud_create.rb:1:in `require': no such file to load --
active_record (LoadErr
or)
from db_crud_create.rb:1

C:\code\dwemthys>
C:\code\dwemthys>type db_crud_create.rb
require 'active_record'
You need to require rubygems first

Fred.
 
T

Thufir

You need to require rubygems first

Thanks, it still gave errors after I did that, but I gave up. Maybe I'll
try again -- I seem to spend half my energy battling the OS.


-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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top