LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-11-2013, 08:11 AM   #1
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
Question Ruby on Debian Squeeze


I'm having some problems getting a RoR application to run on my Debian Squeeze server and I think it has something to do with the way Debian handles ruby.

Afer several attempts to install through the package manager I stripped all ruby related entries and installed RVM and then installed Ruby.

So this is where I am now, is there anything glaringly wrong here

Code:
rvm info
/usr/local/rvm/scripts/info: /usr/bin/gem: /usr/bin/ruby1.8: bad interpreter: No such file or directory

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.


system:

  system:
    uname:       "Linux irvken 2.6.32-5-xen-amd64 #1 SMP Tue Mar 8 00:01:30 UTC 2011 x86_64 GNU/Linux"
    system:      "debian/6.0.6/x86_64"
    bash:        "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.19.1 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "23 hours 37 minutes 26 seconds ago"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         ""
    irb:          "/usr/bin/irb"
    gem:          "/usr/bin/gem"
    rake:         "/usr/bin/rake"

  environment:
    PATH:         "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/bin:/usr/local/bin/"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""
Thanks for any advice/help/pointers in advance
 
Old 04-12-2013, 01:16 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Did you read what you posted?
Code:
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
 
Old 04-15-2013, 04:00 AM   #3
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
Ah, sorry about that. I was assuming readerswould ignore the error message because I had because a) I'm running a remote bash session not a gnome terminal and b) the command runs and outputs below anyway. Perhaps I shoul;d have just posted the relevant output

Code:
system:

  system:
    uname:       "Linux irvken 2.6.32-5-xen-amd64 #1 SMP Tue Mar 8 00:01:30 UTC 2011 x86_64 GNU/Linux"
    system:      "debian/6.0.6/x86_64"
    bash:        "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.19.1 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "23 hours 37 minutes 26 seconds ago"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         ""
    irb:          "/usr/bin/irb"
    gem:          "/usr/bin/gem"
    rake:         "/usr/bin/rake"

  environment:
    PATH:         "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/bin:/usr/local/bin/"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""
 
Old 04-15-2013, 03:51 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
On my system (Fedora 19), /usr/bin/ruby is a bash script that selects the ruby interpreter to be executed. (Either ruby-mri or jruby).

In any case, ruby1.8 seems to be a somewhat unlikely name for the system's ruby interpreter binary. (Unless Debian breaks all scripts using ruby as an interpreter command.)

In any case, note that your listing states that:
Code:
  binaries:
    ruby:         ""
indicating that you have no ruby interpreter binary installed.

(You can, I believe, execute a gem with the gem command, or by using a gem shebang in a script.)
 
Old 04-16-2013, 09:55 AM   #5
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally Posted by irvken View Post
rvm info
/usr/local/rvm/scripts/info: /usr/bin/gem: /usr/bin/ruby1.8: bad interpreter: No such file or directory
I think you should try to reinstall gem. That gem must have been there since ruby1.8 but the system must have updated to 1.9 already. If it doesn't work perhaps you could try reinstalling rvm as well.

Edit: You could also try switching your default interpreter: https://wiki.debian.org/Ruby (take a look at ruby-switch)

Last edited by konsolebox; 04-16-2013 at 10:00 AM.
 
  


Reply

Tags
errors, rails, ruby, rvm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Debian Linux vs. Debian kFreeBSD With Squeeze & Wheezy LXer Syndicated Linux News 0 12-12-2012 10:00 PM
LXer: How to add Debian Squeeze to your Debian Lenny FAI install server LXer Syndicated Linux News 0 09-08-2011 07:21 PM
Various segmentation faults Debian Squeeze Virtualbox running on Debian Squeeze host fordwrench Debian 1 07-21-2011 03:55 AM
LXer: How To Upgrade Debian Lenny (Debian 5.0) To Squeeze (Debian 6.0) On Xen VPS LXer Syndicated Linux News 0 03-09-2011 05:20 AM
LXer: Goodbye Fedora, welcome back Debian, Part 2: Review of Debian Squeeze LXer Syndicated Linux News 0 12-02-2010 09:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration