tag:help.rubygems.org,2010-01-19:/discussions/problems/189-installing-ruby-on-rails-on-rhel-54-x86_64-with-ruby-gemsRubyGems.org: Discussion 2018-10-18T19:50:55Ztag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T19:54:34Z2010-06-14T19:54:34ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>Try running <code>gem install -l rails</code> (lowercase L) in
the directory you have rails and its dependencies in. What is the
output?</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T20:14:20Z2010-06-14T20:14:22ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>Thanks a lot for the response...</p>
<p>I typed that in in the directory I have RUBY in.. I do not have
rails because the gem has yet to function and install it.</p>
<p>[root@doss4100rh1 bin]# gem install -l rails ERROR: could not
find gem rails locally or in a repository</p>
<p>this is in the /usr/local/bin<br>
erb gem irb rdoc ri ruby testrb</p>
<p>Thanks!</p></div>bentag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T20:40:57Z2010-06-14T20:40:57ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>No, the directory where you've put the rails gem and it's
dependencies:</p>
<p>$ ls rails* rails-2.3.8.gem<br>
$ gem install -l rails -i gems ERROR: Error installing
rails:<br></p>
<pre>
<code>rails requires rake (>= 0.8.3, runtime)</code>
</pre>
<p>(I didn't download any dependencies)</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T20:56:49Z2010-06-14T20:56:50ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>Once again, thanks for the response!</p>
<p>Alright I now know what the issue is. The RHEL computer that I
am doing a remote installation of ruby on rails is not connected to
the internet. The rubygems points it's repository to rubygem.org.
What I need to do is download the gems associated with rails
installation into a file then create a local file on the RHEL
machine and put those gems into that file. Then I need to change
rubygem's default repository to point to the local repository.</p>
<p>I'm not sure which gems need to be in the repository for a nice
clean ruby on rails installation.</p>
<p>Thanks!</p></div>bentag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T21:15:54Z2010-06-14T21:15:56ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>In otherwords, what other gems besides rails do I need to have a
fully functional ruby on rails setup? Do I need any other gems?
Installing mongrel?</p>
<p>Also, where is the file(s) that point the repository to
rubygem.org? Is it in lib/ruby/rubygems/defaults.rb? I see this in
there:</p>
<p>def self.default_sources<br></p>
<pre>
<code>%w[http://rubygems.org/]</code>
</pre>
<p>end</p>
<p>Is that all I need to change in order to point to a local
repository?</p>
<p>If so (my apologies, major noob here), would I do
%w[lib/rubygems/local_gem_repository] or something like that? I am
not sure what the %w means.</p>
<p>Thanks</p></div>bentag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T22:03:21Z2010-06-14T22:03:21ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>The easiest way to determine this is to run:</p>
<p><code>gem install -i gems rails --no-rdoc --no-ri</code> on a
machine with internet connectivity then copy gems/cache/* to the
internet-less machine.</p>
<p>There's no need to set up a repository, RubyGems knows how to
install from .gem files on disk.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T22:27:43Z2010-06-14T22:27:48ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>Thanks, I'll see what I can do but I do not think I have
privileges to install ruby and rubygems on my current station,
which is a windows computer anywho.</p>
<p>But anyways, where is gems/cache I cannot find that file, I
looked in the rubygems directory and could not find it.</p>
<p>and if I do not need to create a local repository, then (since
i've already downloaded the rails gem) can't I just move the rails
gem somewhere into the rubygems directory and then do a gem install
rails?</p>
<p>If so, where do I put the rails gem file?</p>
<p>thanks!</p></div>bentag:help.rubygems.org,2010-01-19:Comment/19583012010-06-14T22:49:25Z2010-06-14T22:49:25ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>gems/cache will only exist after you run <code>gem install -i
gems</code>. Otherwise you can trace through the dependencies
starting here by hand: <a href=
"http://rubygems.org/gems/rails">http://rubygems.org/gems/rails</a></p>
<p>See comment 4 for how to install from a .gem file.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/19583012010-06-15T14:21:26Z2010-06-15T14:21:27ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>Sorry, one last question I swear.. Where do the .gem files go? I
have /usr/local/lib<br>
which has:<br>
gauntlet_rubygems.rb rbconfig rubygems ubygems.rb<br>
libruby-static.a ruby rubygems.rb</p>
<p>inside rubygems i have lots of .rb files and folders 'commands',
'ext' and 'package'<br>
inside ruby i have:<br>
1.8 gem gems site_ruby vendor_ruby<br>
which are all folders.</p>
<p>inside gem and gems i basically have the same thing that is in
the rubygems directory above.</p>
<p>Also, when I put those gem files in some local folder next to
gems, when I do a 'gem install..' won't it still look to
rubygems.org for the gems? So don't I still have to change
something so that it knows where to look for the gems? If so
what?</p>
<p>Thanks so much!</p></div>bentag:help.rubygems.org,2010-01-19:Comment/19583012010-06-15T18:26:04Z2010-06-15T18:26:04ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>You have to install the gems (the .gem files) using <code>gem
install -l</code> (lowercase L).</p>
<p>Place them in any convenient directory that's NOT one of the
ones you've listed.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/19583012010-06-15T20:02:11Z2010-06-15T20:02:14ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>I am having a new problem all together.</p>
<p>All the necessary gems are downloaded and are in the directory
/opt<br>
this is where we moved the downloaded ruby file (later used to
install ruby) and the downloaded rubygems file (used to
successfully install rubygems-1.3.6).</p>
<p>the installed rubygems1.3.6 is in /usr/local/lib/rubygems</p>
<p>I am receiving a new error when I try to install rails<br>
if i type ' gem install rails ' I get this error:<br>
[root@doss4100rh1 gems]# gem install rails ERROR: <a href=
"http://rubygems.org/">http://rubygems.org/</a> does not appear to
be a repository<br>
ERROR: could not find gem rails locally or in a repository</p>
<p>before it never said 'could not find gem rails locally or in a
repository'</p>
<p>if I type 'gem install -l rails -i gems' I get this error:<br>
[root@doss4100rh1 opt]# gem install -l rails -i gems ERROR: Error
installing rails:<br></p>
<pre>
<code> actionpack requires rack (~> 1.1.0, runtime)</code>
</pre>
<p>I noticed that in /usr/local/lib/rubygems/commands there is a
file sources_command.rb and with this you can add a source, but
that source must be a URI... not a directory.<br>
Is there anyway I can get rails to know where to look for these
gems, what other directories can I put these gems into?</p>
<p>I could put them on a localhost server and add a source pointing
to the localhost URI... but this causes problems too because I do
not have rails installed on this windows computer and do not have
permissions to do so. Unless there is a way to start up a server
with just ruby, which is installed on the machine that I am trying
to get rails onto, then I'm pretty much stuck on this as well.</p>
<p>Any other ideas of where to put these .gem files or anything,
I've been playing around with it a little so far, not luck yet.</p>
<p>Thanks so much!</p></div>bentag:help.rubygems.org,2010-01-19:Comment/19583012010-06-15T20:36:54Z2010-06-15T20:36:54ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>What gems are in /opt? <code>ls /opt</code></p>
<p>You should not install with -i on this machine, that was only
for gathering the proper gems, it will not do what you want. Just
<code>gem install -l rails</code>.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/19583012010-06-15T21:26:45Z2010-06-15T21:26:45ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>New problem again (by the way, I really appreciate you hanging
in there with me, thanks a lot)</p>
<p>Rails is finally installed, I installed with that command when
inside the /opt directory, but first I had to install rack-1.1.0
.</p>
<p>This is great, I created the an application. Although I know I'm
missing the sqlite gem. But my fear is that I'm missing a lot more
gems. When I looked at the rails gem dependencies on this site it
gave me the 5 or so dependencies that are shown in the paragraph
below. When I looked on my computer from home, there are many many
more gems. But I only wnat the ones I need.</p>
<p>inside /opt , where all the gems I installed are, if I do ' ls
'<br>
actionmailer-2.3.8.gem rubygems-1.3.6 #folder<br>
actionpack-2.3.8.gem rubygems-1.3.6.tgz<br>
activerecord-2.3.8.gem stable-snapshot.tar.gz<br>
activeresource-2.3.8.gem rack-1.1.0.gem<br>
activesupport-2.3.8.gem rails-2.3.8.gem<br>
gems #folder rake-0.8.7.gem<br>
Hello_World#rails_application ruby #folder</p>
<p>Other than this list, and the database gem, are there any
others..<br>
ohh and mongrel I want to get that too.</p>
<p>But other than those, any others that will be necessarily for
clean and smooth development?</p></div>bentag:help.rubygems.org,2010-01-19:Comment/19583012010-06-15T21:42:50Z2010-06-15T21:42:50ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>I don't know what other gems would be good for clean and smooth
development for you. You should ask on a Rails-specific help forum
like the #ror channel on freenode.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/19583012010-06-15T21:46:15Z2010-06-15T21:46:16ZInstalling ruby on rails on RHEL 5.4 (x86_64) with ruby gems<div><p>Alright well at least I got pretty much everything I need,
thanks a lot for the help!!!!!</p></div>ben