Problem installing rails with gems

I have ruby 1.8.4 and gem 0.8.11 installed on Ubuntu Dapper.
Now I wanted to use gem to install rails (as documented in the wiki).
That worked fine, but afterwards, the command rails is not found.
It seems that the gem install command does not place the binaries in the
apropriate directory.

The instruction pages at the Rails websites show that one cun simply
type “rails” after the gem install, but that does not work here.

Is that known/on purpose/a bug?

Roman H. wrote:

I have ruby 1.8.4 and gem 0.8.11 installed on Ubuntu Dapper.
Now I wanted to use gem to install rails (as documented in the wiki).
That worked fine, but afterwards, the command rails is not found.
It seems that the gem install command does not place the binaries in the
apropriate directory.

The instruction pages at the Rails websites show that one cun simply
type “rails” after the gem install, but that does not work here.

Is that known/on purpose/a bug?

Am I the only one who experiences this problem? Any ideas how I could
find out what is going wrong here? It puzzles me that this is obviously
supposed to install the binary somewhere where a standard Linux distro
expects binaries, but this is obviously not happening in my case … :frowning:

Did you apt-get install ruby or compile it yourself?
How did you install rubygems?

What is the output of
which ruby
which gem

I would not use the stock install of ruby on Ubuntu. I would compile
from
source. I will send you my instructions in another email. There are
some
specific steps I follow when doing so.

Aaron K. wrote:

I would not use the stock install of ruby on Ubuntu. I would compile
from
source. I will send you my instructions in another email. There are
some
specific steps I follow when doing so.

Just out of curiosity - why? My guideline and indeed interest is to
install as much as is reasonably possible from a package – not the
least, because then I can uninstall it if required or update it
if there is an update (even get notified by the update manager if
the update is critical).

So … why would there be a problem with installing ruby with apt
and why would this cause gem to misbihave in the way I described?

You may have done some of this already, so disregard the parts that
already
apply:

Me personally, I get the latest stable-snapshot, from ruby-lang.org. It
is
Ruby 1.8.5.

Extract the source somewhere.
cd into that directory where you extracted the source.
Edit ext/Setup
uncomment zlib, ssl, readline

apt-get the following packages:

build-essential
zlib1g-dev
readline5-dev
ncurses-dev

and when I install Ruby from source, I want it to go into /usr/bin
rather
than /usr/local/bin, so I set

./configure --prefix=/usr in the first stage

then make

then sudo make install

Jon L. wrote:

Did you apt-get install ruby or compile it yourself?
How did you install rubygems?

What is the output of
which ruby
which gem

I installed ruby using apt-get install
There is no gem package so I downloaded the distribution and
installed it from there (as root).

which ruby
→ /usr/bin/ruby
ruby -v
→ ruby 1.8.4 (2005-12-24) [i486-linux]
which gem
→ /usr/bin/gem
gem environment

  • VERSION: 0.8.11 (0.8.11)
  • INSTALLATION DIRECTORY: /var/lib/gems/1.8
  • GEM PATH:
    • /var/lib/gems/1.8
  • REMOTE SOURCES:

As a workaround for now I put /var/lib/gems/1.8/bin in the PATH
but that is not really how this should work, is it?

I run Dapper and I have installed ruby and rails on four different
machines simply by doing:

sudo apt-get install ruby ri rdoc

Then I download the latest rubygems from RubyForge (0.9.0) untar it and
run: sudo ruby setup.rb.

Then I do a sudo gem install rails --include-dependencies.

It works fine.

Jamey C.

Aaron K. wrote:

It seems that the gem install command does not place the binaries
_______________________________________________

http://lists.rubyonrails.org/mailman/listinfo/rails

Confidentiality Notice: This email message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and/or privileged information. If you are not the intended
recipient(s), you are hereby notified that any dissemination,
unauthorized review, use, disclosure or distribution of this email and
any materials contained in any attachments is prohibited. If you receive
this message in error, or are not the intended recipient(s), please
immediately notify the sender by email and destroy all copies of the
original message, including attachments.

I forgot to mention that I then download the Rubygems zip file from
rubygems.rubyforge.org and run it manually, as well.

i.e. extract, then run sudo ruby setup.rb

Then I use gem to install rails and all the other fun stuff

Cheers,

Aaron K.