[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

installing gems with rake

Robert Kuzelj

8/21/2006 3:45:00 PM

is that possible.
google says nothing about it.

ciao robertj

--
Posted via http://www.ruby-....

3 Answers

Michael Moen

8/22/2006 4:09:00 AM

0

Robert Kuzelj wrote:
> is that possible.
> google says nothing about it.
>
> ciao robertj

Robert- I'm handling it with a new task and a yml config.

sudo rake gems:install

######## gems.rake ########

namespace :gems do
require 'rubygems'

task :install do
# defaults to --no-rdoc --no-ri, set docs=(anything) to build docs
docs = (ENV['docs'].nil? ? '--no-rdoc --no-ri' : '')
#grab the list of gems/version to check
gems = YAML.load_file 'config/gems.yml'

gems.each do |gem|
# load the gem spec
gem_spec = YAML.load(`gem spec #{gem[:name]}`)
gem_loaded = false
gem_loaded = require_gem gem[:name], gem[:version] rescue nil

# if forced
# or there is no gem_spec
# or the spec version doesn't match the required version
# or require_gem returns false
# (return false also happens if the gem has already been
loaded)
if ! ENV['force'].nil? or
! gem_spec or
(gem_spec.version.version != gem[:version] and ! gem_loaded)

ret = system "gem install #{gem[:name]} -v #{gem[:version]} -y
#{docs}"
# something bad happened, pass on the message
p $? unless ret
else
puts "#{gem[:name]} #{gem[:version]} already installed"
end
end
end
end

######## gems.yml ########

- :name: rails
:version: "1.1.6"

- :name: fastercsv
:version: "0.2.1"

- :name: memcache-client
:version: "1.0.3"

- :name: mongrel
:version: "0.3.13.3"

- :name: mongrel_cluster
:version: "0.2.0"

- :name: uuidtools
:version: "1.0.0"

- :name: ferret
:version: "0.9.5"

--
Posted via http://www.ruby-....

5393 Dead, 526 since 1/20/09

10/2/2008 5:15:00 PM

0

On Thu, 2 Oct 2008 08:05:08 -0700, "OneTwoThree"
<youare@notverysmart.ru> wrote:

>
>"4767 Dead" <zepp22114767@finestplanet.com> wrote in message
>news:mbl9e49nr5181caac1qcppb9uij3g6fj5p@4ax.com...
>> On Thu, 2 Oct 2008 07:02:24 -0700, "House of Pancakes" <hp@wh.net>
>> wrote:
>>
>>>Poll: Obama 51, McCain 40
>>>
>>>Today's Daily Kos Research 2000 tracking poll has Obama up over McCain
>>>51-40. All trackers are data from three days prior to posting, with the
>>>R2K
>>>numbers from today (yesterday's numbers in parentheses) and the other
>>>trackers from yesterday (previous day's data). LV=likely voter,
>>>RV=registered voter
>>>
>>>http://www.dailykos.com/...
>>>
>>>Palin bombing tonight = Obama landslide.
>>
>> Of course, at this point, expectations are so low that if she is able
>> to spell her own name correctly she'll be eligible for the GOP
>> affirmative-action baby bonus round.
>
>thought you folks were in favor of affirmative action... hell, look at your
>speaker of the house.......

At least Polosi knows you can't see Russia from Juneau.
>
>
>
>>>
>>>
>> --
>>
>> Opening up the health insurance market to more vigorous nationwide
>> competition,
>> as we have done over the last decade in banking, would provide more
>> choices of
>> innovative products less burdened by the worst excesses of state-based
>> regulation.
>> -- John McCain, in the Sept/Oct 2008 issue of Contingencies, the magazine
>> of the
>> American Academy of Actuaries.
>> Not dead, in jail, or a slave? Thank a liberal!
>> Pay your taxes so the rich don't have to.
>> For the finest in liberal/leftist commentary,
>> http://www.zeppscommen...
>> For news feed (free, 10-20 articles a day)
>> Zepps_News-subscribe@yahoogroups.com
>> For essays (donations accepted, 2 articles/week)
>> Zepps_essays-subscribe@yahoogroups.com
>> a.a. #2211 -- Bryan Zepp Jamieson
>

OneTwoThree

10/2/2008 7:00:00 PM

0


"4767 Dead" <zeppp@finestplanet.com> wrote in message
news:jb0ae41t2isuelg5atae8ruggukt6olnqt@4ax.com...
> On Thu, 2 Oct 2008 08:05:08 -0700, "OneTwoThree"
> <youare@notverysmart.ru> wrote:
>
>>
>>"4767 Dead" <zepp22114767@finestplanet.com> wrote in message
>>news:mbl9e49nr5181caac1qcppb9uij3g6fj5p@4ax.com...
>>> On Thu, 2 Oct 2008 07:02:24 -0700, "House of Pancakes" <hp@wh.net>
>>> wrote:
>>>
>>>>Poll: Obama 51, McCain 40
>>>>
>>>>Today's Daily Kos Research 2000 tracking poll has Obama up over McCain
>>>>51-40. All trackers are data from three days prior to posting, with the
>>>>R2K
>>>>numbers from today (yesterday's numbers in parentheses) and the other
>>>>trackers from yesterday (previous day's data). LV=likely voter,
>>>>RV=registered voter
>>>>
>>>>http://www.dailykos.com/...
>>>>
>>>>Palin bombing tonight = Obama landslide.
>>>
>>> Of course, at this point, expectations are so low that if she is able
>>> to spell her own name correctly she'll be eligible for the GOP
>>> affirmative-action baby bonus round.
>>
>>thought you folks were in favor of affirmative action... hell, look at
>>your
>>speaker of the house.......
>
> At least Polosi knows you can't see Russia from Juneau.

maybe it was a clear day.... maybe she had a telescope..... ;)


>>
>>
>>
>>>>
>>>>
>>> --
>>>
>>> Opening up the health insurance market to more vigorous nationwide
>>> competition,
>>> as we have done over the last decade in banking, would provide more
>>> choices of
>>> innovative products less burdened by the worst excesses of state-based
>>> regulation.
>>> -- John McCain, in the Sept/Oct 2008 issue of Contingencies, the
>>> magazine
>>> of the
>>> American Academy of Actuaries.
>>> Not dead, in jail, or a slave? Thank a liberal!
>>> Pay your taxes so the rich don't have to.
>>> For the finest in liberal/leftist commentary,
>>> http://www.zeppscommen...
>>> For news feed (free, 10-20 articles a day)
>>> Zepps_News-subscribe@yahoogroups.com
>>> For essays (donations accepted, 2 articles/week)
>>> Zepps_essays-subscribe@yahoogroups.com
>>> a.a. #2211 -- Bryan Zepp Jamieson
>>