I’ve already installed Rails 3.0.6.
Now when i run “script server” on a project realised with rails 3.0.4 it replies me with the following: “Could not find activesupport-3.0.4 in any of the sources”. I’m supposing that the reason is I’ve the activesupport-3.0.6 installed and he cannot find the 3.0.4.
Do you know how to migrate a project from rails3.0.4 to rails 3.0.6?
strange, it should be
since script server is deprecated,
execute gem cleanup to remove gem conflicts
yeah sorry it’s “rails server”
i’ve runned gem cleanup but it didn’t work…
Which version of rails have you specified in your Gemfile?
After changing it there (if you have not already) run
Make sure it is all committed to your source control system (git for
example) before you start.
on Gemfile there were still 3.0.4.
So now i’m changing it on 3.0.6…and everything is working now!
Here again… the same problem
I’ve done a project some weeks ago, using rails 3.0.7
Today i’ve updated the gems by “gem update”, and it installed new versions of some gems like “arel”, “rack”, “rake”.
Then I removed the old versions of the gem by “gem cleanup” and it deleted all the previous versions of them.
My application didn’t start, because some (version of) gems were missing.
After running the command “build install” it installed the previous version of all the gems used by my application so now i’ve again 2 versions of arel, 2 versions or rack, rake etc etc.
Is there a way to “update” my project to the newest versions of the gems? I mean, now my project seems to required an older versions of some gem, so is there a way to update it? I think this is important otherwise it’s useless to update the gems if the proejcts still need and use the older versions…
Is it clear? Thanks guys, see you.
You are not specifying the version of arel in your Gemfile (at least
you shouldn't be), just the version of rails.
You need to understand Gem dependencies a bit better.
Look at Gemfile.lock and you will see Gem dependencies - for example,
rails 3.0.7 depends on activerecord 3.0.7 which depends on arel 2.0.x.
( ~> 2.0.2 means you can use 2.0.3, 2.0.10, etc.)
Bundler will manage these dependencies for you. If you uninstall arel
2.0.10 and keep arel 2.1.x, your app won't start because of a missing
yes that’s the point. My project still requires in the Gemfile.lock Arel 2.0.2. After updating and cleaning up the gem in my system there’s Arel 2.1.1. So is there a way to update my rails project in order to use all the newest versions of the gems? So for example a way to change in the Gemfile.lock Arel 2.0.2 --> Arel 2.1.1 ?
I tried “bundle update” but it only updates the gem in the system and not the references in my project.
- sorry, “bundle update” doesn’t update the gems in my system, but install the previous version of them required by the project… so it’s the same as “bundle install”…
Instead I would like to update the references in my project of the newest version of gems.
You could generate a new scratch application without specifying Rails version (thus getting the latest) and look at the versions that get written into that new Gemfile. Manual translation is the only way -- the idea here is that once you've generated an application, you make the decisions (manually and deliberately) about what to do next.
You are missing the point I made - activerecord 3.0.7 depends on arel
2.0.x - it was not written against arel 2.1.1, and bundler figures
this out for you and manages the dependencies accordingly.
You could fork activerecord 3.0.7 and make it use arel 2.1.1, but why
would you want to take on that headache? Is there some new must have
feature in arel 2.1.1 that you need?
Oh ok understood Well I thought that a new version of a gem is better then the previous one, so why Arel update at 2.1.1 if Activerecord doesn’t use the new version? It seems to be useless…
I understood that maybe Activerecord doesn’t need or doesn’t care about a new version…
Well I don’t know what Arel is used to, but I’ve noticed the same behaviour for the gems RAKE and RACK for example… It should be important to use a new version of them no?
Anyway, i’ve understood your point, thanks again for ur time!!