On Sep 29, 2011, at 5:00 PM, Barney wrote:
> On Sep 29, 2:30 pm, Rob Biedenharn <R...@AgileConsultingLLC.com>
> wrote:
>> On Sep 29, 2011, at 1:16 PM, Barney wrote:
>>
>>> Hi All,
>>> In trying to port a working version from one computer to another
>>> I had installed the requisites and copied over the files in the
>>> rails
>>> project. However one method wouldn't work and it was because the
>>> gem
>>> involved wouldn't work with the newest rails. After uninstalling
>>> rails, reinstalling an earlier version and playing with DevKit, et.
>>> al., I've managed to fubar the project so that now it even claims it
>>> can't find rubygems. So I'm inclined to uninstall gems, the devkit
>>> and rails and then copy over the code again, essentially starting
>>> over.
>>> Question 1) what is the proper method of uninstalling those 3?
>>> Question 2) What is the function of the file "Gemfile.lock". Should
>>> it be copied over or will it be generated?
>>> Thanks,
>>> Barney
>>
>> Let me answer your 2nd question first. The Gemfile.lock specifies
>> the
>> versions of each gem that were selected to satisfy the dependency
>> graph. You should copy it over (actually, you should check it into
>> the
>> repository; you are using a code repository, right?) and then a
>> bundle
>> install will use those versions. Without Gemfile.lock, it builds a
>> new dependency graph, either with gems it finds or gems that it
>> installs, and constructs a new Gemfile.lock with the results.
>>
>> You can also run `bundle package` to put all the .gem files into
>> vendor/cache/ (by default) which can also be kept in the repository.
>>
>> Copy the Gemfile.lock over and see if `bundle install` doesn't just
>> solve your problem.
>>
>> -Rob
>>
>> Rob Biedenharn
>> R...@AgileConsultingLLC.com http://AgileConsultingLLC.com/
>> r...@GaslightSoftware.com http://GaslightSoftware.com/
>
> Thanks, Rob. I'll copy over my original tomorrow morning.
> Is there anything special I have to know if I still need to start over
> (in terms of being careful to delete certain things that uninstall
> didn't uninstall, etc.)?
> Barney
The bundle install will very likely be all you need. It will install
additional versions of gems if the one that you got originally on the
new machine is different. Then you will almost certainly want to use
`bundle install _cmd_` whenever you run a _cmd_ that needs gems to be
sure that you're getting the right version(s).
-Rob
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment