I have an intranet only server unable to connect the web even through a proxy, so I always used to update Ruby gems via downloaded gems and the command (e.g for rails):
gem install 'rails-x.y.z.gem'
Now I've got to upgrade rails to, at least, 2.3.11, but can't find that release's gem on RubyForge.
Releases on RF seem to end at 2.3.4...
I guess I'm missing some very basic requirement.
Can someone help me?
Thanks,
Andrea Colleoni
You can find it on rubygems - http://rubygems.org/gems/rails/versions
Related
How to find out which gems need to be updated in a Rails app if the Ruby version is upgraded?
For example, I would like to know which of my Rails app gems will have to be upgraded if I upgrade my Ruby from 2.1.3 to 2.2.2. The preference would be to keep the changes minimal as to reduce the probability of things breaking.
The important thing would be for this to be a dry-run. So that one can assess the amount of work that an upgrade will require.
I have checked bundle and gem readme's without much luck.
If you update your rails version, it should install or resolve the required dependencies needed to run the new rails version. As far as as the gems you have entered that are NOT dependencys to Rails, you can check gem compatibility on rubygems.org. Just type in the title of your gem in the search bar.
I am facing issue when I am trying to work with rails 3.0.11. I initially worked with rails 3.2.6. Build a prototype application in Rails 3.2.6, Ruby 1.9.2 and gem 1.8.7. But then found, server on which we need to host is a shared server which can only support Rails 3.0.11, Ruby 1.8.7 and gem 1.7.2.
Hence I want to keep my dev environment exactly same before I ran into further issues. As I found there was some discrepancy in routes.rb of both the versions.
Steps I followed:
Uninstalled rails
Uninstalled ruby
Installed ruby from here.
This installed ruby version 1.8.7-p370 and gem 1.8.7
After this I installed rails by specifying version as 3.0.11
But still when I run command rails -v, it throws an error to me saying 'missing gem rails 3.2.6. Run bundle install to resolve the issue'
When I ran bundle install, it again completely installed rails 3.2.6 and problem remained unresolved.
Please suggest the clean way how shall I start my development on rails 3.0.11 without running into any issues?? Am I need to delete some registry or mapping in my system through which it is detecting rails 3.2.6 and creating issues??
Its urgent as I need to complete my dev by 7th September.
As I am new to stackexchange, please guide is it appropriate to ask question on the same related thread or shall I open new discussion for my problem?
#Gun - please note in response to one of your comments posted above - you DO need to change your Gemfile - if you are running rails -v from withing your project's directory, it will read the Gemfile.
There is a script located at script/rails - this is what runs when you run the rails command from the project directory. NOTE that this rails script requires your config/application.rb file - which in turn reads the Gemfile and bundles the referenced gems. Thus is your Gemfile still references 3.2.6, and it is not installed, rails -v will not work
Glad to hear the problem is fixed :)
As for the asset pipeline - if you are using rails 3.2.6 (or were using it) then you may have been using the asset pipeline to serve your assets (javascript files, CSS files, images, etc). If you were, and you downgrade to anything pre rails version 3.1, then anything being served through the asset pipeline will no longer work.
Here is a pretty good description of the asset pipeline: http://guides.rubyonrails.org/asset_pipeline.html
You should check also remove your Gemfile.lock or manually 'bundle update rails' when you change your rails dependency.
I suggest to use rbenv or rvm to create a virtual environment/sandbox where you can install your preferred ruby versions (e.g. 1.8.7) and keep tracking of your dependencies separately. This would save you a lot of effort.
Keep in mind that rails 3.0 has no asset pipeline support (it has been included in rails 3.1)! This is a very important difference and if you depend on it you will have big issues to solve for the downgrade.
Thanks a lot everyone for help.
I believe it was weird issue. I had heroku on the system. I was initially deploying my app on the same and then changed to another hosting server.
After uninstalling the heroku, it works perfectly fine. Probably, that was interfering somewhere. Although, not sure but problem is resolved.
Thanks a lot again for a great great help!!!
Meanwhile, I would request alup to throw some more light on asset pipeline support. Wots that? Could you please explain more??
Need to delete C:\Users\.ror folder and C:\Users\.gemfile and C:\Users\.gemfile.lock from your desktop..
I had another post started:
Rack / Passenger fails on Dreamhost
but after some digging I am thinking my gems are incompatible. My Dreamhost Passenger uses Rails 3.0.3 and my dev system has 3.1.3. I have been playing around with rvm and gem but I can't figure out how to force rails and v3.0.3 dependancies.
Can anyone confirm that this is my issue and if so where do I start? I am sure I am missing something obvious but all my Googling has come up empty handed so far.
I am pretty new to Rails and the entire gem concept still hurts my brain and this is probably have the issue I have so far :^)
The simple solution is to edit the passenger entry in your gemfile to this:
gem 'passenger', '3.0.3'
and then run bundle update passenger on your dev machine.
I would really highly recommend you look into using rbenv or rvm to install and manage ruby and gems separate from the system gems that Dreamhost has installed though. I'm not sure if that's outside their terms, but you should be able to install locally for your user. This will help you avoid the same problem with other gems in the future.
I'm trying to figure out if I can run on the same server(I have an AWS running with ubuntu) a Rails 2 and a Rails 3 applications?
Is this possible? Or I'm just dreaming?
Thanks people.
Yes, it's possible. Ruby and RubyGems are designed to install and run different version of the same Gem on the same server and Rails it's nothing more than a Gem.
My suggestion is to use Bundler to isolate Gem dependencies and Rails versions. It's quite easy to do, Rails 3 uses Bundler by default. You can use Bunder with Rails 2.3 as well. The instructions are on the Bundler website.
When you deploy your project, Bundler will install the necessary dependencies and you'll be able to run two or more projects with several different versions of Rails on the same machine.
Yes it is possible. You need a Ruby Version Manager: https://rvm.io/
Some weeks ago I upgraded my NetBeans version from 6.7 to 6.8.
Yesterday, while trying to solve some issue, I updated the gems' versions and suddenly the app stop working, throwing me the error message:
Missing the Rails 2.3.4 gem. Please
gem install -v=2.3.4 rails, update
your RAILS_GEM_VERSION setting in
config/environment.rb for the Rails
version you do have installed, or
comment out RAILS_GEM_VERSION to use
the latest version installed.
Rails 2.3.4 is installed, and its specified correctly in environment.rb file as follows:
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
I spent hours trying to fix this, when I discovered I had gems both in my NetBeans directory and in the Ruby directory. So I changed the Gems Home to the Ruby directory(instead of the NetBeans dir) and the app magically started.
That being said, I think that's not the proper solution, because I'm using both directories and I guess it's bringing me problems. Fox example, I cannot send emails any more, as posted here.
Any help will be appreciated! Thanks in advance.
Why not keep gems in one place?
From your other post i'm assuming you're using windows so if you're not using pik (like rvm but for windows) then i don't see the point of 2 (or more) gem locations as it's obviously leading to problems.
I'm sticking with 1 gem location.