Rails Install on Linux (SuSE 9.3) Fails

Hello.

I’m just getting started with RoR, and I’m none too good at Linux
either. :slight_smile:

But anyway, I got ruby-1.8.4.tar.gz and rubygems-0.8.11 and unpacked
them in separate directories under my normal user (jim) home and went
there and did

./configure, then make, then make test (test succeeded), then su - and
make install, and then in the unpacked RubyGems folder, ruby setup.rb,
all with no obvious errors.

Now I go to the RubyGems folder and try to install Rails and I get:

RubyGems/rubygems-0.8.11/bin # gem install rails --include-dependencies
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require__': no such file to load -- zlib (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:9
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:61:in
`manage_gems’
from /usr/local/bin/gem:4

so then when I type

rails /home/jim/railsApp1

I get

bash: rails: command not found

Sorry if this is a stupid Linux error on my part, but hey, I gotta start
somewhere, right?

Thanks for any help on Rails or Linux or SuSE 9.3 (which, I
understand, is not just any Linux. :slight_smile:

Jim

It appears you need to install zlib. This is a unix lib, not a ruby
one, so you need to install it with your package manager (i think
yast on Suse??) not gem.

But search the archives for suse + zlib, seems some people have
trouble with zlib bindings and have to install it manually.

Michael J.

Thanks, Michael.

I will try this ASAP (probably Wednesday).

Another question I should have asked but did not think of soon enough:

Where is the detailed, step-by-step “Getting Started” manual for us
newbies, to include helpful ways to avoid known problems such as you
just pointed out, as well as something like what I described in my
original post (he asks hopefully)?

Thanks again.

Jim

OK, I tried to install zlib and my system seems to already have it:

jim@QL1:~> su -
Password:
QL1:~ # apt-get install zlib
Reading Package Lists… Done
Building Dependency Tree… Done
zlib is already the newest version.
0 upgraded, 0 newly installed, 0 removed and 169 not upgraded.
QL1:~ #

This is starting to sound like a “path” issue in Windows.

Note that I issue the “gem install” command at

QL1:/home/jim/source/Ruby_Rails_etc/RubyGems/rubygems-0.8.11/bin #

and my Ruby is in

QL1:/home/jim/source/Ruby_Rails_etc/ruby-1.8.4

Does this matter?

Thanks for any help.

Jim

Also:

QL1:/home/jim/source/Ruby_Rails_etc/ruby-1.8.4/ext/zlib # ls
. … .cvsignore Makefile doc extconf.rb mkmf.log zlib.c
QL1:/home/jim/source/Ruby_Rails_etc/ruby-1.8.4/ext/zlib # make
make: Nothing to be done for `all’.

???