1.2.1 -> 1.23 Upgrade; New Projects Frozen at 1.2.1?

Disclaimer: I’m a Rails newbie, be gentle.

I’ve got an Ubuntu Feisty install here. After adding Ruby and Rails
via Synaptic, I’ve got Rails 1.2.1. To get up to date, I did a “gem
update rails”. So far, so good, AFAICS.

Now when I create a new project (e.g. “rails new-project”), the config/
environment.rb points to Rails 1.2.1 in the RAILS_GEM_VERSION. Worse,
there’s a copy of rails in vendor/rails, and according to rails/info/
properties, it’s 1.2.1.

If I fix the version number in RAILS_GEM_VERSION and unfreeze the
project (rake rails:unfreeze), the project seems to behave as 1.2.3.
But … i’m assuming I shouldn’t have to do that for a new project.
Why’s the project frozen from the get-go, and why is it choosing 1.2.1
when 1.2.3 is available?

I’m totally open to the idea that this is all my fault, but I’m just
not sure why this is happening. Google searches aren’t really
helping. Well, that’s not true, they helped me find the workaround,
but they aren’t helping me find out why this is happening.

  • Geoffrey

Geoffrey W. wrote:

  • Geoffrey

Ubuntu and Synaptic do some really strange stuff with Rails. (ie.
putting a rails shell script in /bin instead of the proper rails
executable)

The following worked for me a week ago.

  1. Unstall Rails through Synaptic.
  2. Install RubyGems per the instructions on rubyonrails.org (if you
    haven’t already done so).
  3. If you’d already installed RubyGems and Rails as a gem before, then
    Synaptic totally screwed up your install. Uninstall the Rails gem.
    .
  4. Make sure the shows that you don’t have any versions of
    Rails installed.
  5. Install rails as a gem < gem install rails --include-dependencies >
  6. STOP.


http://www.5valleys.com/

On Jun 27, 3:19 pm, Jon G. [email protected] wrote:

Geoffrey W. wrote:

Ubuntu and Synaptic do some really strange stuff with Rails. (ie.
putting a rails shell script in /bin instead of the proper rails executable)

Yeah, I was starting to realize that when I couldn’t get “rails -v” to
work, and that the only people complaining about it were on Ubuntu
(and possibly Debian).

  1. Install rails as a gem < gem install rails --include-dependencies >
  2. STOP.

I’d already done some portion of this and failed to resolve the issue,
so I really went down to bare metal, took ALL of Ruby/Rails/Rake/irb
etc out of Synaptic, put back in the bare minimum, and got the rest
from Ruby Gems.

This seems to have resolved the version issue, the “rails -v” issue,
and other things. It’s probably true that if I had a really good
understanding of how Rails should be installed, I could diagnose what
Ubuntu did that caused the problem and fix it in a much less brute-
force way, but this approach worked for me. :wink:

So I came back to share it, and you’ve just posted something very
similar. Thanks!

  • Geoffrey

Geoffrey W. wrote:

So I came back to share it, and you’ve just posted something very
similar. Thanks!

  • Geoffrey

Glad to hear you got it going!


http://www.5valleys.com/