Why the size of rails souorce and gem is different?

Hi ,

I just curious to know, why the source of rails (about +10mb) vs
rails.gem (+200kb) is very different ?

I just want to know how to use the rails from source instead from the
gem …

Thank you ! :smiley:

I just curious to know, why the source of rails (about +10mb) vs
rails.gem (+200kb) is very different ?

I just want to know how to use the rails from source instead from the
gem …

The gem is a small stub that requires other gems such as
active_record, action_pack, action_mailer, etc… Look at the
dependancies for the rails gem to see them all.

-philip

Ok, so the source come up with the dependecy right … how to install
it from source?
I might be prefer the source than the gem because I cannot download
the package using gem (blocked by proxy and i need to install on
several offline sources)

Tx

You are complicating matters that do not need to be complicated!

Just install it via rubygems.

On Dec 12, 2007 4:13 PM, Ryan B. [email protected] wrote:

The gem is a small stub that requires other gems such as
http://www.frozenplague.net

Ryan B.
http://www.frozenplague.net

what if the computer are offline … :slight_smile:
i used to open the gem and check for the dependency and then
downloading the other gem (from internet cafe, i have no internet
access at my boarding house) For each gems i did checking and
downloading manually from gems.sourceforge.net
And i did installation using gems at home, one by one … so if the
source has everything in one … i would be helpfull for me :smiley:

while in the office, i can access the internet but the gems must go
thru the proxy (i read the wiki about gems installation, and they
mention to download apsever from sourceforge.net, but i couldnt
download it since the website was gone … )

so, that was the condition :slight_smile:

"rake rails:freeze:gems

This will copy the Rails files to the “vendor/rails” directory of your
application. When the Rails framework runs, your application will
first check for the presence of this directory. If it exists, Rails
will load the Rails components from the directory instead of using the
main server copy of Rails. As long as you do not delete these files,
your application will continue to use your “frozen” version of Rails."

Copy the folder from one app to all the other ones that are offline.

Of course, all your applications should be compatible with the version
you are freezing.

i dont think this will solve the problem. because it just freeze the
rails version not installing new one using source :slight_smile:

On Dec 12, 2007 3:53 PM, Adwin W. [email protected] wrote:

I just curious to know, why the source of rails (about +10mb) vs


Ryan B.

i dont think this will solve the problem. because it just freeze the
rails version not installing new one using source :slight_smile:

Yes, it will.

At the internet cafe, create a bare bones rails application (ie. rails
barebones). Then run the rake rails:freeze:gems task below. That will
copy all of the “source” into vendor/rails.

Now, zip that up and keep it somewhere you can access it. Copy that to
all your other machines and rename “barebones” to the name of your
application (as well as tweaking config/database.yml, etc.).

Now each rails app will have it’s own copy of the “source”.

-philip

You can freeze gems or you can freeze edge and specify a tag

rake rails:freeze:edge TAG=‘rel_1-2-6’

This is really the appropriate thing to do on a server because it’s
safer.
Your apps are unaffected should you update a gem.

However, I’ve found that the simplest solution is to do this:

On your machine with Internet access:

mkdir /rails
svn co http://dev.rubyonrails.org/svn/rails/tags/rel_2-0-1/ /rails/201
svn co http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-6/ /rails/126
svn co http://dev.rubyonrails.org/svn/rails/tags/rel_1-1-6/ /rails/116

Copy the /rails folder out to your server.

Whenever you deploy a new app, either

  1. copy the version of Rails to your app’s vendor/rails folder

or better,

  1. synmlink /rails/210 to your_app/vendor/rails

Do this in your after_update step in Capistrano and you’re all set :slight_smile:

I would do slightly different.

Instead of zipping everything, I would zip only the vendor folder,
because
thats what he needs.

Then on a “offline” machine, just copy the vendor folder over, check
environment.rb about RAILS_VERSION. If environment.rb requires a version
that is different than the one in the vendor folder I dont think its
going
to work.

On Dec 12, 2007 10:58 AM, Philip H. [email protected]
wrote:

Now, zip that up and keep it somewhere you can access it. Copy that to

And i did installation using gems at home, one by one … so if the

You are complicating matters that do not need to be complicated!

Just install it via rubygems.


Felipe Knaesel Koch