How would I go about installing rails plugins offline? I cannot connect
to the web on my work computer, though I have a dedicated internet
machine for downloads and such.
Thanks
How would I go about installing rails plugins offline? I cannot connect
to the web on my work computer, though I have a dedicated internet
machine for downloads and such.
Thanks
On Dec 29, 8:28 am, sa 125 [email protected] wrote:
How would I go about installing rails plugins offline? I cannot connect
to the web on my work computer, though I have a dedicated internet
machine for downloads and such.
Installing plugins just copies them to vendor/plugins, so if you can
download them elsewhere you should be fine.
Fred
On Mon, Dec 29, 2008 at 12:58 AM, Frederick C.
[email protected] wrote:
download them elsewhere you should be fine.
This isn’t entirely accurate. There are some install scripts that can
be run when the plugin includes them. (for example, setting up some
config files for you)
For example, look at the following plugin (one our customers use for
deployment for http://railsboxcar.com/ )
You’ll see in the README that there is a command to run script/runner
install.rb if you’re doing manually.
So, if you are doing it manually, make sure to check for an install.rb
(or uninstall if you’re removing a plugin)
Cheers,
Robby
–
Robby R.
Chief Evangelist, Partner
PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails
http://www.robbyonrails.com/
aim: planetargon
+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]
I thought so, just wanted to confirm. Thanks!
On Dec 29, 2:52 pm, Robert W. [email protected]
wrote:
sa 125 wrote:
How would I go about installing rails plugins offline? I cannot connect
to the web on my work computer, though I have a dedicated internet
machine for downloads and such.This is precisely why I generally prefer gems over plugins,
How does using gems help at all? It seems to me that gems would
suffer from precisely the same problem as plugins here.
Now that
Rails has good support for gem dependencies I expect to see most plugins
converted to gems. This already seems to be a pretty popular trend.
And I think an unfortunate one. Unless there’s something I don’t
understand about gem packaging (which is quite possible ), it seems
to me that while it’s easy to install a plugin into one app without
affecting the whole environment, it’s hard to do so for a gem. (Yes,
I know about frozen gems, but the usual way of doing that is to
install the gem on the development computer first, then freeze it into
the app.) I often need to install gems on my local machine in order
to work on clients’ projects (after all, not everyone freezes their
gems), and I wish it wasn’t necessary – I don’t want to change my
entire operating environment for the sake of one project.
I like gems for things like RSpec that I actually use on every
project. But I hope the day never comes when I have to install a
special-purpose gem for just one app because it doesn’t exist as a
plugin.
Marnen Laibow-Koser
[email protected]
http://www.marnen.org
sa 125 wrote:
How would I go about installing rails plugins offline? I cannot connect
to the web on my work computer, though I have a dedicated internet
machine for downloads and such.
This is precisely why I generally prefer gems over plugins, Now that
Rails has good support for gem dependencies I expect to see most plugins
converted to gems. This already seems to be a pretty popular trend.
Marnen Laibow-Koser wrote:
On Dec 29, 2:52�pm, Robert W. [email protected]
wrote:sa 125 wrote:
How would I go about installing rails plugins offline? I cannot connect
to the web on my work computer, though I have a dedicated internet
machine for downloads and such.This is precisely why I generally prefer gems over plugins,
How does using gems help at all? It seems to me that gems would
suffer from precisely the same problem as plugins here.
It helps because the more common gems are likely already installed on my
system. All I need to do for a new project is to add the gem dependency
to the environment.rb file. The command to install a plugin wants to go
out and download the plugin from the internet. Yes, obviously, if I
don’t have the gem installed I would still need an internet connection,
but I don’t have to do any coping or hacking around to copy a plugin
from some obscure location in my local system.
Example:
config.gem “rubist-aasm”, :lib => “aasm”
This line added to my environment.rb file is all I need to do in a new
project to use the aasm gem that I likely already have installed on my
system.
And I think an unfortunate one. Unless there’s something I don’t
understand about gem packaging (which is quite possible ), it seems
to me that while it’s easy to install a plugin into one app without
affecting the whole environment, it’s hard to do so for a gem. (Yes,
I know about frozen gems, but the usual way of doing that is to
install the gem on the development computer first, then freeze it into
the app.) I often need to install gems on my local machine in order
to work on clients’ projects (after all, not everyone freezes their
gems), and I wish it wasn’t necessary – I don’t want to change my
entire operating environment for the sake of one project.
Gems are the “standard” packaging for Ruby (not specifically Rails).
Using gems is natural for Ruby developers and using gem dependencies in
Rails is a more natural fit than plugins for sharing code.
I think of them in a similar way as I think about “Frameworks” in my
Cocoa development. I like that there is basically one way to share code
between different applications when doing Mac development. Plugins, in
my mind, are a different thing. A plugin architecture is a means of
extending an application’s capabilities and not simply a means of
sharing code between different applications. So yes, maybe plugins do
have a place in this context, but that is not generally how Rails
plugins are used.
I realize this is subjective, but I do prefer sharing code through gems
rather than plugins.
I like gems for things like RSpec that I actually use on every
project. But I hope the day never comes when I have to install a
special-purpose gem for just one app because it doesn’t exist as a
plugin.
Rspec is actually a really good example. It was a plugin and is now a
gem. I prefer it as a gem because I might want to share it between
multiple applications. I only have to maintain one repository of
“framework” code. If I need a specific application to depend on a
specific version of rSpec I simply tell it that in it’s environment.rb
file.
config.gem “rspec-rails”, :lib => “spec”, :version => “1.1.11”
Then I can see all my dependencies quickly and easily in a terminal:
$ rake gems
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
And manage my application’s environment with the various rake gems:xxx
commands.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs