Karrick McDermott wrote:

> % pfexec gem update
> % pfexec gem install rails --include-dependencies
>
> This works without error and installs rails 2.0.2 with all dependencies.
>
> However, both [/usr/ruby/1.8/bin/rails] and [/usr/ruby/1.8/bin/rake] are 
> installed with the wrong permissions:
>
> % pfexec chmod a+rx /usr/ruby/1.8/bin/rails /usr/ruby/1.8/bin/rake
>   


 This is strange.  What are the permissions that you are seeing?  I ran 
the same steps on my b87 machine, and here's how the permissions show 
up.  They are sufficient for a user to use rails.

bash-3.2$ ls -ltr  /usr/ruby/1.8/bin
total 448
-rwxr-xr-x   1 root     bin          156 Apr  1 17:05 testrb
-rwxr-xr-x   1 root     bin         1494 Apr  1 17:05 ri
-rwxr-xr-x   1 root     bin         1546 Apr  1 17:05 rdoc
-rwxr-xr-x   1 root     bin          382 Apr  1 17:05 irb
-rwxr-xr-x   1 root     bin         3885 Apr  1 17:05 erb
-rwxr-xr-x   1 root     bin          655 Apr  1 17:05 update_rubygems
-rwxr-xr-x   1 root     bin         7953 Apr  1 17:05 
index_gem_repository.rb
-rwxr-xr-x   1 root     bin         1819 Apr  1 17:05 gemwhich
-rwxr-xr-x   1 root     bin          521 Apr  1 17:05 gemri
-rwxr-xr-x   1 root     bin         3207 Apr  1 17:05 gemlock
-rwxr-xr-x   1 root     bin           76 Apr  1 17:05 gem_server
-rwxr-xr-x   1 root     bin         1784 Apr  1 17:05 gem_mirror
-rwxr-xr-x   1 root     bin          707 Apr  1 17:05 gem
-rwxr-xr-x   1 root     bin       183424 Apr  2 04:07 ruby
-rwxr-xr-x   1 root     root         334 May  9 18:28 rake
-rwxr-xr-x   1 root     root         342 May  9 18:29 rails



> ...and their links are not created in [/usr/bin]:
>   

thats right - the links that you see in /usr/bin to ruby, gem, and irb 
are created by the packaging(ie., IPS or svr4).  The Ruby install 
doesn't create them.  The gem command doesn't create symlinks from 
/usr/bin . . . it places binaries into the same directory as the Ruby 
executable is installed in.

Hence you'd have to look for rails in the place where ruby is 
installed.  It doesn't seem that intuitive, given the fact that you 
didn't think of looking there for it.

I'll file a CR to patch rubygems to place executable symlinks in /usr/bin.

> % cd /usr/bin && pfexec ln -s ../ruby/1.8/bin/rails rails && pfexec ln -s 
> ../ruby/1.8/bin/rake rake
>
> However, even after this is done, most of the files in 
> [/var/ruby/1.8/gem_home] seem to have incorrect permissions.  Please correct 
> me if I'm wrong.
>
> % pfexec chmod -R a+r /var/ruby/1.8/gem_home/*
>   

Again this is very strange . . . I have the following permissions.  Is 
this not what you get when you install rails?

bash-3.2$ ls -ltr  /var/ruby/1.8/gem_home/
total 13800
-rw-r--r--   1 root     root     7050079 May  9 18:28 source_cache
drwxr-xr-x   2 root     bin          512 May  9 18:29 cache
drwxr-xr-x  10 root     bin          512 May  9 18:29 gems
drwxr-xr-x   2 root     bin          512 May  9 18:29 specifications
drwxr-xr-x  10 root     bin          512 May  9 18:30 doc



> Dispite all the above changes, when I execute the following, I get an error:
>
> % cd ~ && rails test
> /usr/bin/rails:16:in `load': no such file to load -- rails (LoadError)
>         from /usr/bin/rails:16
>
> Indeed, line 16 of the [/usr/bin/rails --> /usr/ruby/1.8/bin/rails] ends with 
> a command to [load 'rails'].
>   


Can you try setting GEM_HOME=/var/ruby/1.8/gem_home:$GEM_HOME (or the 
equivalent in your shell).

This should not be necessary, since this should already be in 
rubygems.rb - but this seems like somehow your gem home is not being 
recognized by the gem command.
 -ps


> By the way, I have installed the following IPS packages to get started, but 
> there may be one that I'm missing.  (This list is not all inclusive.)
>
> gcc-dev
> ss-dev
> java-dev
> netbeans
> ruby-dev
>   

You have the right stuff.
 -ps


> sunstudioexpress
> webstackui
>
>
> Thanks in advance,
> Karrick
> opensolaris (at) karrick (dot) net
> This message posted from opensolaris.org
>
> _______________________________________________
>
>
> webstack-discuss mailing list
> webstack-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/webstack-discuss
>   


-- 
Prashant Srinivasan
F/OSS Enthusiast
Sun Microsystems, Inc.
http://blogs.sun.com/prashant
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x82FBDE5A


Reply via email to