I'm new to Ruby and I am willing to learn. Anyone need help on a
project for the next 3 days? All my friends are on vacation and I have
nothing better to do. I do have programming experience in Java and C.
Have you done the Ruby Koans?
···
On Fri, Jul 1, 2011 at 11:43 AM, Joe Peric <peric.joe@gmail.com> wrote:
I'm new to Ruby and I am willing to learn. Anyone need help on a
project for the next 3 days? All my friends are on vacation and I have
nothing better to do. I do have programming experience in Java and C.
Never heard of it, but I'll get right on it. Thanks.
···
On Fri, Jul 1, 2011 at 11:56 AM, Jeremy Heiler <jeremyheiler@gmail.com> wrote:
On Fri, Jul 1, 2011 at 11:43 AM, Joe Peric <peric.joe@gmail.com> wrote:
I'm new to Ruby and I am willing to learn. Anyone need help on a
project for the next 3 days? All my friends are on vacation and I have
nothing better to do. I do have programming experience in Java and C.Have you done the Ruby Koans?
Just finished this. I had to find some more info on exceptions to get
past that part, and it took me a while to figure out that
"method_missing" is automagically called on a class if it doesn't have
the method being called. Redifining that made the proxy koan much
easier to solve.
I still need some brushing up on regex and file IO stuff.
Thanks again for pointing me in the right direction.
···
On Fri, Jul 1, 2011 at 11:58 AM, Joe Peric <peric.joe@gmail.com> wrote:
Never heard of it, but I'll get right on it. Thanks.
On Fri, Jul 1, 2011 at 11:56 AM, Jeremy Heiler <jeremyheiler@gmail.com> wrote:
On Fri, Jul 1, 2011 at 11:43 AM, Joe Peric <peric.joe@gmail.com> wrote:
I'm new to Ruby and I am willing to learn. Anyone need help on a
project for the next 3 days? All my friends are on vacation and I have
nothing better to do. I do have programming experience in Java and C.Have you done the Ruby Koans?
No problem!
Two other sites come to mind:
- http://rubyquiz.com/
- http://projecteuler.net/
···
On Sat, Jul 2, 2011 at 1:39 PM, Joe Peric <peric.joe@gmail.com> wrote:
Just finished this. I had to find some more info on exceptions to get
past that part, and it took me a while to figure out that
"method_missing" is automagically called on a class if it doesn't have
the method being called. Redifining that made the proxy koan much
easier to solve.I still need some brushing up on regex and file IO stuff.
Thanks again for pointing me in the right direction.
A tutorial site here.
···
2011/7/3 Jeremy Heiler <jeremyheiler@gmail.com>
On Sat, Jul 2, 2011 at 1:39 PM, Joe Peric <peric.joe@gmail.com> wrote:
> Just finished this. I had to find some more info on exceptions to get
> past that part, and it took me a while to figure out that
> "method_missing" is automagically called on a class if it doesn't have
> the method being called. Redifining that made the proxy koan much
> easier to solve.
>
> I still need some brushing up on regex and file IO stuff.
>
> Thanks again for pointing me in the right direction.
>No problem!
Two other sites come to mind:
Two other sites come to mind:
[...]
Jeremy, thanks for that hint, I instantly fell in love with this site. Unfortunately I was never great at math but I love to tinker with such problems. Cool ![]()
- Markus
···
On 02.07.2011 19:46, Jeremy Heiler wrote:
Hi.
Im programming for the fun of it. I lose my internet connection
in a month, for a looong time.
So I thought if I switch to perl I can download the cpan and
have 22000 modules on my hd. So I did.
But I really,really,really prefer Ruby.
So I thought maybe I can download all of gem?
So I can stick with ruby?
/Mix
There's no free WiFi anywhere near you so you can get a few gems now and then?
···
On Sun, Jul 3, 2011 at 9:51 AM, m b <snert@hotmail.se> wrote:
Hi.
Im programming for the fun of it. I lose my internet connection
in a month, for a looong time.So I thought if I switch to perl I can download the cpan and
have 22000 modules on my hd. So I did.
But I really,really,really prefer Ruby.
So I thought maybe I can download all of gem?
So I can stick with ruby?/Mix
Hi,
I found "gem mirror" command in a old version of gem, but
a current version of gem doesn't have such a command.
Now, I think that the one way to download all gem files is to do
following steps:
1. obtain all gem names with "gem search" command
$ gem search --remote
2. download all gem files with "gem fetch" command
$ gem fetch [gemname] [gemname] [gemname] ...
([gemname] is one of the gem names obtained in step 1)
Although this way is troublesome if you do by your hand,
you can write a simple script which do these steps automatically.
There might be a better way than this way, but I don't know.
Regards,
···
--
NOBUOKA Yu
Hi *,
···
On 07/03/2011 04:57 PM Y. NOBUOKA wrote:
1. obtain all gem names with "gem search" command
$ gem search --remote
2. download all gem files with "gem fetch" command
$ gem fetch [gemname] [gemname] [gemname] ...
([gemname] is one of the gem names obtained in step 1)Although this way is troublesome if you do by your hand,
you can write a simple script which do these steps automatically.
using bash this might look like this:
=========================================================================
$ for GEM in $(gem search -qr | awk 'NR>2 { print $1 }'); do gem fetch
${GEM}; done;
All available remote gems (~25k@gemcutter) will be fetched to the current
working directory. However, this also includes all sort of garbage modules
created for testing or those no longer under active development.
Hope this helps ...
So long ...
Jan
This worked for me:
$ cd some/dir/to/store/gems/in
$ gem update --system && gem search --no-installed --no-details
--no-versions --remote | awk 'NR<10' | xargs gem fetch --bulk-threshold 2
Latest version currently installed. Aborting.
Fetching: 10io-jekyll-0.10.0.gem (100%)
Downloaded 10io-jekyll-0.10.0
Fetching: 1234567890_-1.0.gem (100%)
Downloaded 1234567890_-1.0
Fetching: 12_hour_time-0.0.3.gem (100%)
Downloaded 12_hour_time-0.0.3
Fetching: 24games-0.2.1.gem (100%)
Downloaded 24games-0.2.1
Fetching: 2Performant-0.0.8.gem (100%)
Downloaded 2Performant-0.0.8
Fetching: 360_services-1.1.3.gem (100%)
Downloaded 360_services-1.1.3
Fetching: 3d-ribbon-0.1.1.gem (100%)
Downloaded 3d-ribbon-0.1.1
Fetching: 3scale_client-2.2.7.gem (100%)
Downloaded 3scale_client-2.2.7
If you want all of them, just don't pipe it through awk. I think Jan is on
the right path with fetching the gems (as opposed to installing them, which
could have security consequences, and probably lead to hard to track bugs
from some gem authors not understanding the conventions). Then, when you
want one of the gems, you can cd into that dir and `$ gem install
gemname-version.gem`
Of course, this doesn't fetch every version of every gem, just the most
recent.
···
On Sun, Jul 3, 2011 at 9:57 AM, Y. NOBUOKA <nobuoka@r-definition.com> wrote:
Hi,
I found "gem mirror" command in a old version of gem, but
a current version of gem doesn't have such a command.Now, I think that the one way to download all gem files is to do
following steps:1. obtain all gem names with "gem search" command
$ gem search --remote
2. download all gem files with "gem fetch" command
$ gem fetch [gemname] [gemname] [gemname] ...
([gemname] is one of the gem names obtained in step 1)Although this way is troublesome if you do by your hand,
you can write a simple script which do these steps automatically.
Date: Mon, 4 Jul 2011 03:35:02 +0900
From: jan@agetty.de
Subject: Re: downloading all of gem to my hd?
To: ruby-talk@ruby-lang.org
CC: nobuoka@r-definition.comHi *,
> 1. obtain all gem names with "gem search" command
> $ gem search --remote
> 2. download all gem files with "gem fetch" command
> $ gem fetch [gemname] [gemname] [gemname] ...
> ([gemname] is one of the gem names obtained in step 1)
>
> Although this way is troublesome if you do by your hand,
> you can write a simple script which do these steps automatically.using bash this might look like this:
=========================================================================
$ for GEM in $(gem search -qr | awk 'NR>2 { print $1 }'); do gem fetch
${GEM}; done;All available remote gems (~25k@gemcutter) will be fetched to the current
working directory. However, this also includes all sort of garbage modules
created for testing or those no longer under active development.Hope this helps ...
thanx ill try this.. im sure cpan holds some garbage modules too.. this means i can stick with ruby.. ![]()
···
On 07/03/2011 04:57 PM Y. NOBUOKA wrote:
So long ...
Jan
This is actually sh syntax. It just *also* happens to work in bash.
···
On Mon, Jul 04, 2011 at 03:35:02AM +0900, Jan wrote:
using bash this might look like this:
=========================================================================
$ for GEM in $(gem search -qr | awk 'NR>2 { print $1 }'); do gem fetch
${GEM}; done;
--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
What about
$ gem19 help mirror
?
Cheers
robert
···
On Sun, Jul 3, 2011 at 10:24 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Sun, Jul 3, 2011 at 9:57 AM, Y. NOBUOKA <nobuoka@r-definition.com> wrote:
Hi,
I found "gem mirror" command in a old version of gem, but
a current version of gem doesn't have such a command.Now, I think that the one way to download all gem files is to do
following steps:1. obtain all gem names with "gem search" command
$ gem search --remote
2. download all gem files with "gem fetch" command
$ gem fetch [gemname] [gemname] [gemname] ...
([gemname] is one of the gem names obtained in step 1)Although this way is troublesome if you do by your hand,
you can write a simple script which do these steps automatically.This worked for me:
$ cd some/dir/to/store/gems/in
$ gem update --system && gem search --no-installed --no-details
--no-versions --remote | awk 'NR<10' | xargs gem fetch --bulk-threshold 2
Latest version currently installed. Aborting.
Fetching: 10io-jekyll-0.10.0.gem (100%)
Downloaded 10io-jekyll-0.10.0
Fetching: 1234567890_-1.0.gem (100%)
Downloaded 1234567890_-1.0
Fetching: 12_hour_time-0.0.3.gem (100%)
Downloaded 12_hour_time-0.0.3
Fetching: 24games-0.2.1.gem (100%)
Downloaded 24games-0.2.1
Fetching: 2Performant-0.0.8.gem (100%)
Downloaded 2Performant-0.0.8
Fetching: 360_services-1.1.3.gem (100%)
Downloaded 360_services-1.1.3
Fetching: 3d-ribbon-0.1.1.gem (100%)
Downloaded 3d-ribbon-0.1.1
Fetching: 3scale_client-2.2.7.gem (100%)
Downloaded 3scale_client-2.2.7If you want all of them, just don't pipe it through awk. I think Jan is on
the right path with fetching the gems (as opposed to installing them, which
could have security consequences, and probably lead to hard to track bugs
from some gem authors not understanding the conventions). Then, when you
want one of the gems, you can cd into that dir and `$ gem install
gemname-version.gem`Of course, this doesn't fetch every version of every gem, just the most
recent.
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
Expect the next version of bash to fix this bug. ![]()
···
On Mon, Jul 4, 2011 at 12:37 AM, Chad Perrin <code@apotheon.net> wrote:
On Mon, Jul 04, 2011 at 03:35:02AM +0900, Jan wrote:
using bash this might look like this:
=========================================================================
$ for GEM in $(gem search -qr | awk 'NR>2 { print $1 }'); do gem fetch
${GEM}; done;This is actually sh syntax. It just *also* happens to work in bash.
--
Phillip Gawlowski
twitter.com/phgaw
phgaw.posterous.com
A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
-- Leibniz
I don't have it:
$ gem -v
1.8.5
$ gem help mirror
WARNING: Unknown command mirror. Try gem help commands
$ gem help commands
GEM commands are:
build Build a gem from a gemspec
cert Manage RubyGems certificates and signing settings
check Check installed gems
cleanup Clean up old versions of installed gems in the local
repository
contents Display the contents of the installed gems
dependency Show the dependencies of an installed gem
environment Display information about the RubyGems environment
fetch Download a gem and place it in the current directory
generate_index Generates the index files for a gem server directory
help Provide help on the 'gem' command
install Install a gem into the local repository
list Display gems whose name starts with STRING
lock Generate a lockdown list of gems
outdated Display all gems that need updates
owner Manage gem owners on RubyGems.org.
pristine Restores installed gems to pristine condition from
files
located in the gem cache
push Push a gem up to RubyGems.org
query Query gem information in local or remote repositories
rdoc Generates RDoc for pre-installed gems
search Display all gems whose name contains STRING
server Documentation and gem repository HTTP server
sources Manage the sources and cache file RubyGems uses to
search
for gems
specification Display gem specification (in yaml)
stale List gems along with access times
uninstall Uninstall gems from the local repository
unpack Unpack an installed gem to the current directory
update Update the named gems (or all installed gems) in the
local
repository
which Find the location of a library file you can require
For help on a particular command, use 'gem help COMMAND'.
Commands may be abbreviated, so long as they are unambiguous.
e.g. 'gem i rake' is short for 'gem install rake'.
···
On Tue, Jul 5, 2011 at 4:55 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
What about
$ gem19 help mirror
?
Cheers
robert
looks like it hasn't been released as a gem yet... I haven't seen much movement on it lately so I don't know the status of it.
That said... `gem mirror` will download ALL the gems, not just the latest. It's a bit heavy handed if you're looking to do something more casual.
···
On Jul 5, 2011, at 04:36 , Josh Cheek wrote:
On Tue, Jul 5, 2011 at 4:55 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
What about
$ gem19 help mirror
?
I don't have it:
$ gem -v
1.8.5$ gem help mirror
WARNING: Unknown command mirror. Try gem help commands