Announcement

Collapse
No announcement yet.

SOLVED: ruby install via adept not found by rubygems

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SOLVED: ruby install via adept not found by rubygems

    I am accumulating considerable evidence that my installation of ruby1.8, done yesterday via adept (along with rubygems), cannot be found by other programs.

    1. While I was able for a while to install gems, the past two attempts, for some reason, both failed, with the error message sh: ruby: not found. Yet irb works, and I thought that irb required ruby to run. Also, a run of locate ruby yields a ton of output (242 lines), including extensive files in /usr/share/doc/libruby1.8/, /usr/share/doc/libgems-ruby1.8/. Also I see /usr/bin/ruby1.8 and /var/cache/apt/archives/ruby1.8_1.8.6.36-1ubuntu3_i386.deb

    Results of my last attempt to install the sqlite3-ruby gem:
    tom@tomcloyd-desktop:/var/cache/apt/archives$ sudo gem install sqlite3-ruby
    [sudo] password for tom:
    Select which gem to install for your platform (i486-linux)
    1. sqlite3-ruby 1.2.1 (mswin32)
    2. sqlite3-ruby 1.2.1 (ruby)
    3. sqlite3-ruby 1.2.0 (mswin32)
    4. sqlite3-ruby 1.2.0 (ruby)
    5. Skip this gem
    6. Cancel installation
    > 2
    Building native extensions. This could take a while...
    ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

    ruby extconf.rb install sqlite3-ruby
    sh: ruby: not found


    Gem files will remain installed in /var/lib/gems/1.8/gems/sqlite3-ruby-1.2.1 for inspection.
    Results logged to /var/lib/gems/1.8/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/gem_make.out
    tom@tomcloyd-desktop:/var/cache/apt/archives$


    2. Aptana Studio (a merge of Eclipse and Radrails and some other stuff) cannot find ruby, no matter where I tell it to look.

    This looks like (maybe) a path (my Windows past tells me) or permissions problem. Yet, how can permissions be a problem if the installation was via adept?

    I'm really in need of some guidance on this. Thanks for any help anyone can offer.

    #2
    Re: ruby install via adept not found by rubygems

    Originally posted by tomcloyd
    [b]tom@tomcloyd-desktop:/var/cache/apt/archives$ sudo gem install sqlite3-ruby
    Why are you running the apt-get command from within /var/cache/apt/archives? You only need to run apt-get package (as sudo) from within your user home directory.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: ruby install via adept not found by rubygems

      Well damn. What you're telling me is that this installation mechanism (apt-get) isn't smart enough to simply put things where they belong. This is a gun with which I can shoot my very own foot. But it's worse than that, it appears. Unbelievable.

      As a newbie (and you know, there's a lot of us, and this is because some people have trying hard to get our attention, and have succeeded), it not helpful to look at the only documentation I know of - the info or man pages, and get reams of technogarble, but no mention at all of what you've just told me: be in the directory when you fire this gun or you'll be doing a lot of hopping in the future.

      I'm a huge fan of Kubuntu, and Linux in general, now that I've been working with it for a number of weeks. However, we still have a ways to go on the user interface part of it (documentation included). This particular problem - with apt-get - absolutely needs to be called to one's attention at the top of the documentation. It isn't. I have to see any warning about this at all, and the notion that it may be presumed that users will understand this is naive. I've been running and programming computers for 3 decades, and this problem never occurred to me.

      So...starting over. Thanks for your help.

      Comment


        #4
        Re: ruby install via adept not found by rubygems

        When one wishes to use apt-get instead of the GUI Adept Manager to retrieve/install packages, one first (of course) opens a console. This console opens in the users home directory (type pwd from the command line and you'll see this). Running sudo apt-get install package reads the cache to see if the program is 'listed.' If it is, it procedes to retrieve the package file to the /var/cache/apt/archives directory. After the package has been downloaded, it is then installed.

        Both gem and sqlite3-ruby are listed in Adept Manager, and one 'could' just mark both for installation there. But, if you desire to do it from the command line, then the command you would type is:
        Code:
        sudo apt-get install gem sqlite3-ruby
        This will retrieve and install both packages.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: ruby install via adept not found by rubygems

          Originally posted by Snowhog
          Originally posted by tomcloyd
          [b]tom@tomcloyd-desktop:/var/cache/apt/archives$ sudo gem install sqlite3-ruby
          Why are you running the apt-get command from within /var/cache/apt/archives? You only need to run apt-get package (as sudo) from within your user home directory.
          OK, this time I made sure I was in /home/tom/ before issuing the command. Sadly it made no difference. The result remains:

          Building native extensions. This could take a while...
          ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
          ERROR: Failed to build gem native extension.

          ruby extconf.rb install sqlite3-ruby
          sh: ruby: not found

          I've posted this all to the ruby-talk forum (the main ruby forum), and for 24 hours there's been no response. This forum has very heavy traffic, but I'm getting no help. Not sure what to do next.

          Comment


            #6
            Re: ruby install via adept not found by rubygems

            PROBLEM SOLVED.

            Please see last post in this thread --
            http://forums.aptana.com/viewtopic.p...asc&highlight=

            For 24 hours I've gotten no response to this problem either in this forum or in the ruby-talk forum (the main ruby forum). Them I checked in on this somewhat older thread I started in the Aptana forum - for some obscure reason. There was a new post, and the idea in it worked completely, to solve this current related problem.

            That this special procedure (which I would never have figured out myself) is needed for Ubuntu Linux is something that really should be noted somewhere. I don't really understand the problem, but someone did (Tombigel), and his solution worked for me as well.

            Comment

            Working...
            X