Ruby gems error?

hi,
im having a nightmare time trying to view a ruby site. im trying to run
the server, but i think theres some problem with the gems. the error im
getting is here: http://www.timbirkett.co.uk/er.gif
ive installed 1.1.6 (i think!) but it still thinks its on 1.2.1. the
site ive been given to work on is expecting 1.1.6.
any ideas?
thanks

  • D
    ps
    im a newbie at thi sif anyone was wandering!!

I suspect either you don’t have 1.1.6 installed,

verify by running “gem query list” from cmd line.

Or, you application is pegged to 1.2. Did you “rails my_app” with 1.2
installed? You may want to delete and redo that command with 1.1.6.

Also, you can check which rails version your app is pegged to by looking
in environment.rb

You will see something like…

Specifies gem version of Rails to use when vendor/rails is not present

RAILS_GEM_VERSION = ‘1.1.6’

if it says 1.2.1, that’s at least part of your problem.

/ak

dan schrieb:

thanks for your input on this. just a quick run down of wher i am:
2 days ago i installed ruby/rail/mySQL. i went through a tutorial,
created a skeleton site and all works as expected. my client then sent
me their site that is already been done in ruby. for starters i couldnt
find the script folder so i couldnt run the command: ruby script/server.
i copied over a ‘script’ folder into the site to allow me to try and
preview it. teh rails i installed has gems v1.2.1, but my clients site
uses gems v1.1.6. ive downloaded gems 1.1.6 and did all it said to
install them, but it doesnt seem to have installed them!? if i change
the environment.rb file to use 1.2.1 then i get the error that youve
seen, if i change it to 1.1.6 then it says it cant find ‘gem for rails
1.1.6’!? so it looks like a simple install of 1.1.6, but i cant get it
working!? also, its probably best if it uses the latest version of rails
(1.2.1) anyway.
ive run the command gem query list and it says:
http://www.timbirkett.co.uk/er2.gif
so it looks like 1.2.1 is installed even though ive done everything to
properly install 1.1.6.
you said: “Or, you application is pegged to 1.2. Did you “rails my_app”
with 1.2
installed? You may want to delete and redo that command with 1.1.6.”. i
dont know what you mean “rails my_app”. how do i delete and redo this?
ive been in the environment.rb file and when i change it to 1.1.6 is
says “cannot find gem for rails 1.1.6”. (ive mentioned this already
above!). if i change it to 1.2.1 then i get the
error:http://www.timbirkett.co.uk/er.gif.
im going in circles with this! thanks for your help.

  • D

thanks dan, ill try your suggestions. someone mentioned on another forum
that it could be the file column plugin and to uninstall the plugin, but
i wasnt sure what he meant by this (i havnt heard of file column
plugins). anyway, cheers.

  • D

Well, that’s sounds frustrating.

first, “rails my_app” was a bit vague, properly stated I meant the
standard “rails /path/to/my_app” command which generates the skeleton
Rails application.

I would caution against jumping straight to 1.2.1, if there are plugin
dependencies in the app you could be headed for more heavy weather.

Have you tried a “gem install rails -v 1.1.6”. You’ll need to specify
1.1.6, otherwise you default to 1.2.

Try “gem install --help” for more details.

I would “rails /path/to/my_app” in a new folder to create a clean
skeleton app with all necessary components. Then I would copy in (copy
over as necessary) the client provided application.

Good luck,

/ak

dan schrieb:

i dont get this. i generated the skelton site and pasted over teh
relevant docs with the existing website, try and do a ‘ruby
script/server’ and still teh same errors. i did the ‘gem install rails
-v 1.1.6’ and installed all its dependancies. ive just done a ‘gem -v’
(to get the version number), and its saying 0.9.0!? thats not right is
it? ive done a ‘gem list --local’ to see what that did and it does
mention (along with a list of other stuff): rails(1.2.1, 1.1.6) AND
actionwebservice(1.2.1, 1.1.6). so have i got both versions now on my
machine?
strangeness…

yes, you have both rails on your machine.

gem -v is telling you the version of the RubyGems package manager. Thus
0.9.0 is correct.

going back to the original error post, look at environment.rb line 59.
My guess is that you’ll see some sort of Plugin include statement. If
it’s not installed in the vendor/plugins folder, well that would be a
problem.

then you’ll need to do (from app root) “ruby script/plugin install
required_plugin_name_here”

/ak

dan schrieb:

hi,
ok, i think ive got it sussed. i found the file column plugin which is
used for file uploads. ive wrote the cmd line to download it and tat
seems to have done it!
i wander why it wasnt installed with all teh other plugins i dowloaded?
(i still cant find any of those!)
anyway, thanks for all your help. now ive got to figure out how to get
their existing db (which looks like its mySQL) working (only ever used
access before).
anyway, many thanks

  • Dan

hi dan,
on line 59 it does mention file column but no mention of plugins. this
is what it says in my environment file from line 56 to line 62:

FILE_COLUMN_PREFIX = ‘images’
module FileColumn
module ClassMethods
DEFAULT_OPTIONS[:root_path] = File.join(RAILS_ROOT, “public”,
FILE_COLUMN_PREFIX)
DEFAULT_OPTIONS[:web_root] = “#{FILE_COLUMN_PREFIX}/”
end
end

ive installed every plugin available (although nothing has appeared in
my vendor/plugins folder?). and restarted the webrick server (it said
somewhere to do this for the plugins to take effect.) still no joy,
comes up with the same errors.

any suggestions?
thanks for your help on this. im learning a lot as i go along(!)

  • D