Hi,
I am a newb to RoR but finding it much more difficult than most people
maintain. I’m trying to follow a beginner’s tutorial and have
meticulously followed each step but keep running into problems. Just
in case, I have even tried everything on two different machines with no
luck.
(The tutorial is by Obie F. and can be found on page 14 of
http://www.ratio.co.uk/ov9pdf.pdf.)
My two machines are both Windows XP; for the first I installed
everything piecemeal (Ruby, Rails, MySQL, etc) and for the second I
used InstantRails. They both SEEM to be working in every way except
for the problems given below. I have searched numerous posts and sites
for some answers, but though people seem to be encountering these
problems no one has suggested a solution that works for me. PLEASE
help, if you can–I would so appreciate it!
ERROR 1: This is the error I get when trying to run a Ruby console (a
la page 19 of the tutorial). Interestingly I did not get this error
before starting the tutorial.
C:\user\example>ruby script\console
Loading development environment.
c:/Ruby/lib/ruby/1.8/irb/init.rb:252:in require': no such file to load -- ./script/../config/../config/environment (LoadError) from c:/Ruby/lib/ruby/1.8/irb/init.rb:252:in
load_modules’
from c:/Ruby/lib/ruby/1.8/irb/init.rb:250:in load_modules' from c:/Ruby/lib/ruby/1.8/irb/init.rb:21:in
setup’
from c:/Ruby/lib/ruby/1.8/irb.rb:54:in `start’
from c:/Ruby/bin/irb.bat:20
ERROR 2: This is the error I get when trying to run a generic test
(nothing customized yet) using rake (a la page 20 of the tutorial):
C:\user\example>rake
(in C:/user/example)
c:/Ruby/bin/ruby -Ilib;test
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb”
c:/Ruby/bin/ruby -Ilib;test
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb”
rake aborted!
Test failures
In case you are interested to see the whole trace (using --trace), it
is as follows:
C:\user\example>rake --trace
(in C:/user/example)
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:prepare
** Invoke db:test:clone (first_time)
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Execute db:test:clone
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Invoke test:functionals (first_time)
** Invoke db:test:prepare
** Execute test:functionals
c:/Ruby/bin/ruby -Ilib;test
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb”
** Invoke test:integration (first_time)
** Invoke db:test:prepare
** Execute test:integration
c:/Ruby/bin/ruby -Ilib;test
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb”
rake aborted!
Test failures
c:/Ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/testing.rake:35
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in execute' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
execute’
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in invoke' c:/Ruby/lib/ruby/1.8/thread.rb:135:in
synchronize’
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in
invoke_prerequisites’
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in each' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in
invoke_prerequisites’
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in invoke' c:/Ruby/lib/ruby/1.8/thread.rb:135:in
synchronize’
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in
run’
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
c:/Ruby/bin/rake.bat:25
Does anyone have any clue what is going on? As I say, I have searched
numerous groups and sites and can’t find any answers to these two
problems. Please do help!
Many thanks in advance,
TOM