Forum: Ruby on Rails ruby gems error?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
dan (Guest)
on 2007-01-31 14:56
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!!
Andy K. (Guest)
on 2007-01-31 20:07
(Received via mailing list)
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:
dan (Guest)
on 2007-02-01 13:15
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
Andy K. (Guest)
on 2007-02-01 17:34
(Received via mailing list)
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:
dan (Guest)
on 2007-02-01 17:51
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
dan (Guest)
on 2007-02-01 19:08
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...
Andy K. (Guest)
on 2007-02-01 20:39
(Received via mailing list)
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:
dan (Guest)
on 2007-02-02 12:10
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
dan (Guest)
on 2007-02-02 17:36
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
This topic is locked and can not be replied to.