Forum: Ruby on Rails gem install ruby 0> doesn't install Ruby but says it does

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D48be99143e13e40d1c44a4da63a53f4?d=identicon&s=25 Mongeta 99 (raimon)
on 2009-02-01 09:29
Hello,


I'm trying to set up a complete RoR with PostgreSQL and nginx plus
mongrel_cluster on Lenny.

I'll have all installed, except Ruby ...

$ gem install rails
1 gem installed

$ ruby --version
command not found

And I have the rails gem installed ....

Any idea why I can't use Rails ???

thanks!

r.

------------------------------

my list of gems:

rai@debian:/$ gem list

*** LOCAL GEMS ***

actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.1)
gem_plugin (0.2.3)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
pg (0.7.9.2008.10.13)
rails (2.2.2)
rake (0.8.3)
rai@debian:/$


my versions:

rai@debian:/$ irb -v
irb 0.9.5(05/04/13)
rai@debian:/$ gem -v
1.2.0
rai@debian:/$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
rai@debian:/$ rails --version
-bash: rails: command not found
rai@debian:/$


After installing gem, rails, mongrel, ... on the remote server, I had
to add two alias to the bash files, I don't know if I have to do
something similar to Rails:

alias ruby=ruby1.8
alias irb=irb1.8

but I can't find the correct path of Rails

$ find . -type f -name "*rails" -print
(nothing found)
D48be99143e13e40d1c44a4da63a53f4?d=identicon&s=25 Mongeta 99 (raimon)
on 2009-02-01 10:39
Now I've installed Rails with aptitude:

rai@debian:~$ sudo aptitude install rails

and my system recognize the rails command but for example not the
--version option:

rai@debian:~$ rails --version
getopt: unrecognized option `--version'
Terminating...


on my OS X I can issue rails --version and get the 2.2.2. version output


any ideas ?

thanks,

r.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-02-01 23:58
(Received via mailing list)
Apparently rubygems and ruby packages installed via apt-get
occasionally do weird, often slightly broken, things (like the
inability to do rails --version)

Fred
D48be99143e13e40d1c44a4da63a53f4?d=identicon&s=25 Mongeta 99 (raimon)
on 2009-02-02 08:09
Frederick Cheung wrote:
> Apparently rubygems and ruby packages installed via apt-get
> occasionally do weird, often slightly broken, things (like the
> inability to do rails --version)
>
> Fred

so, it's better to install from source code and compile it the gem ruby
instead of with aptitude ?

in my previous Debian Etch I had installed all from source code but got
stucked on nginx and all their dependencies, so I've installed Lenny and
all with aptitude ...

thanks,

r.
Ad6aac3e6bdfae418eb11feabfc6a667?d=identicon&s=25 Shrikant Lokhande (shrikant)
on 2009-02-02 08:55
(Received via mailing list)
Hello Guys,

It seems to need export path of ruby, rubygems Library.
This is just Example How to export Path:
---------------------------------------------------------------------
export GEM_HOME=/usr/local/rubygems/gems
export GEM_PATH=/usr/local/rubygems/gems
export RUBYLIB=/usr/local/rubygems/lib
export PATH=/usr/local/rubygems/gems/bin:/usr/local/rubygems/bin:$PATH
---------------------------------------------------------------------
Because I don't know your server environment. may be its /usr/local/
lib/ruby/ So please confirm and export that should work.
Let me know if i can help you.

Thanks-
Shrii

On Feb 2, 12:09 pm, Raimon Fs <rails-mailing-l...@andreas-s.net>
D48be99143e13e40d1c44a4da63a53f4?d=identicon&s=25 Mongeta 99 (raimon)
on 2009-02-02 09:59
Shrikant Lokhande wrote:
> Hello Guys,
>
> It seems to need export path of ruby, rubygems Library.
> This is just Example How to export Path:
> ---------------------------------------------------------------------
> export GEM_HOME=/usr/local/rubygems/gems
> export GEM_PATH=/usr/local/rubygems/gems
> export RUBYLIB=/usr/local/rubygems/lib
> export PATH=/usr/local/rubygems/gems/bin:/usr/local/rubygems/bin:$PATH
> ---------------------------------------------------------------------
> Because I don't know your server environment. may be its /usr/local/
> lib/ruby/ So please confirm and export that should work.
> Let me know if i can help you.
>
> Thanks-
> Shrii
>
> On Feb 2, 12:09�pm, Raimon Fs <rails-mailing-l...@andreas-s.net>


my current paths:

debian:~# find / -name 'ruby' -print
/usr/bin/ruby
/usr/lib/ruby
/usr/share/doc/ruby
debian:~# find / -name 'rubygems' -print
/usr/lib/ruby/1.8/rubygems
debian:~#

ebian:~# find /usr/ -name 'rails' -print
/usr/bin/rails
/usr/share/rails
/usr/share/rails/railties/bin/rails
/usr/share/rails/railties/lib/rails
/usr/share/rails/railties/builtin/rails_info/rails
/usr/share/doc/rails
/usr/share/doc/rails/html/files/vendor/rails
/usr/share/doc-base/rails
/usr/share/lintian/overrides/rails


the problem was it wasn't working and now I see that my find commands
were wrong, I don't know if it was simply a path problem, so I installed
rails with aptitude and later upgraded it with gem upgrade rails

but, my initial question was about rails and not ruby or rubygems ...

thanks !

r,
Ad6aac3e6bdfae418eb11feabfc6a667?d=identicon&s=25 Shrikant Lokhande (shrikant)
on 2009-02-02 10:38
(Received via mailing list)
Yes, There is relation between that.
Please do only:
export GEM_HOME=/usr/local/lib/ruby/gems/1.8

and try again, so that will export another path's.

Thanks-
Shrii
Ad6aac3e6bdfae418eb11feabfc6a667?d=identicon&s=25 Shrikant Lokhande (shrikant)
on 2009-02-02 10:40
(Received via mailing list)
Or, Refer
---------------------
http://www.debian-administration.org/articles/329
--------------------

Thanks-
Shrii

On Feb 2, 2:37 pm, "lokhande.shrik...@gmail.com"
D48be99143e13e40d1c44a4da63a53f4?d=identicon&s=25 Mongeta 99 (raimon)
on 2009-02-02 10:46
ok, thanks ...

I'm going to re-install again Leny and start again ...

:-)

regards,

r.
This topic is locked and can not be replied to.