rails_gem_install 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,39 @@
1
- = rails_gem_install
1
+ = Overview of rails_gem_install
2
2
 
3
- Description goes here.
3
+ Installs the gem dependencies of your Rails 2 project where <tt>rake gems:install</tt> fails.
4
+
5
+ Using <tt>rake gems:install</tt> has a number of problems:
6
+
7
+ * It depends on Rails. You have to manually install Rails before you can use <tt>rake gems:install</tt>
8
+ * It depends on your Rails environment. This can create a circular dependency where some file (particularly vendored plugins/gems) can require a gem to be loaded before the task to install it runs.
9
+ * Most of the time it just doesn't work. Adding a new <tt>config.gem</tt> requirement, then running <tt>rake gems:install</tt> will fail with a complaint that it is missing the gem you are expecting it to install for you.
10
+
11
+ This tool aims to solve these problems by providing a tool that is NOT dependent on Rails or the Rail apps's environment in order to determine and install the dependencies.
12
+
13
+ For more background and a brief description of how it works, check out the blog post at http://sleeplesscoding.blogspot.com/2010/07/install-rails-apps-dependencies-where.html
14
+
15
+ == Installation
16
+
17
+ gem install rails_gem_install
18
+
19
+ == Usage
20
+
21
+ <b>IMPORTANT:</b> You must run this command from the +RAILS_ROOT+ of your Rails 2 app.
22
+
23
+ cd my_rails_app
24
+ RAILS_ENV=production rails_gem_install
25
+
26
+ This will install all the gem dependencies for running your Rails app under the specified environment, so you may want to do this multiple times for multiple environments. For example, you may want to do this using your test environment too, if you have additional <tt>config.gem</tt> configurations in <tt>config/environments/test.rb</tt>.
27
+
28
+ Note that this will run <tt>gem install</tt> commands, so run as root/sudo if you want them to be installed that way.
29
+
30
+ == Caveats
31
+
32
+ This has only been tested for a Rails 2.3.5 project where there was no pre-existing Rails installation or other gems, and incrementally after that as the <tt>config.gem</tt> configuration changes. There may be some corner-case dependencies I may have missed.
33
+
34
+ == Credits
35
+
36
+ Inspired by this gist[http://gist.github.com/136461] from troelskn[http://github.com/troelskn].
4
37
 
5
38
  == Note on Patches/Pull Requests
6
39
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -1,5 +1,11 @@
1
1
  RAILS_ENV = ENV['RAILS_ENV']
2
2
  RAILS_ROOT = Dir.pwd
3
+
4
+ # A dummy implementation of the Rails module to implement a few things
5
+ # we need from Rails in order to compute and install dependencies, plus
6
+ # a simplified implementation of the <tt>config.gem</tt> installation
7
+ # mechanism. This is all so we can do the parts of <tt>rake gems:install</tt>
8
+ # from Rails that we need, without depending on Rails to do it.
3
9
  module Rails
4
10
  def self.root
5
11
  RAILS_ROOT
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Scott W. Bradley