I have used this procedure.I m using Linux Mint.
I am getting the following error while installing.
E: Unable to locate package libreadline6-dev
E: Unable to locate package libyaml-dev
E: Unable to locate package libgdbm-dev
E: Package 'ncurses-dev' has no installation candidate
E: Package 'bison' has no installation candidate
E: Package 'subversion' has no installation candidate
E: Package 'libffi-dev' has no installation candidate
I think you didn't installed the rvm requirements .
Install the requirements like libreadline6-dev , libyaml-dev , libgdbm-dev ,etc..
I think This will solve the Problem.
Install all these with the command
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 \
libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison \
subversion pkg-config
Or, Just refer this link.
This instructions are old, following rvm installation instructions:
\curl -#L https://get.rvm.io | bash -s stable --autolibs=4 --ruby
It will:
Download and install RVM
Enable automatic requirements installation
Install ruby including all required dependencies
which OS you using ?
if you using Ubuntu,
then use the link :
http://blog.sudobits.com/2012/05/02/how-to-install-ruby-on-rails-in-ubuntu-12-04-lts/
if you are using windows
then problem while installing in some gem dependence like. 'libffi-dev', less-rail
than used other OS that very well for "Ruby on Rails" like Linux/Ubuntu
If you're using ubuntu, the copy and paste https://github.com/vaneyckt/Ruby-on-Rails-installation-script/blob/master/install.sh. You might need to hit enter at some point.
this worked for me.
WARNING: The following packages cannot be authenticated!
apt-get clean # Remove cached packages
cd /var/lib/apt
mv lists lists.old # Backup mirror info
mkdir -p lists/partial # Recreate directory structure
apt-get clean
apt-get update # Fetch mirror info
Related
I want to install rvm, but I get this error. How do I remove this error?
root#jaskaran:/# ruby -v
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
Try: apt-get install <selected package>
//--------------------------------------------------------------
here#jaskaran:/$ rvm install 2.1.0
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.10/i386/ruby-2.1.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system................
Error running 'requirements_debian_update_system ruby-2.1.0',
showing last 15 lines of /home/zapbuild/.rvm/log/1396242152_ruby-2.1.0/update_system.log
++ case "${TERM:-dumb}" in
++ case "$1" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
\n'
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ return 100
Requirements installation failed with status: 100.
Thanks
To install rvm run this.
$ \curl -sSL https://get.rvm.io | bash
Or in case you just want to update your rvm with the available ruby list, use rvm get stable. Now install ruby using rvm install ruby-2.1.0 or rvm install 2.1.0. This should fix the issue
I ran into the same issue on ubuntu 14.04 today.And I removed broken source in source.list and source.list.d/*.And it just worked fine for me.
After that you can run
sudo apt-get update
rvm requirements
Hope that is helpful.
Remove PPA sources from software setting and run these commands in your terminal:
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.3
rvm use 2.1.3 --default
ruby -v
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
gem install rails
rails -v
I am very new to Linux (been living in MS world for many years). I thought I'd try something different, like ruby on rails under linux. Been trying to get a dev machine set up, and I must say, it's been quite overwhelming! Here is what I have done so far, and my current problem that I cannot figure out:
Installed Linux Mint 15 (was this a bad choice? the only reason I ask is all the difficulties I've had so far)
Ran the update manager and installed all updates.
Install git
sudo apt-get install git
Install rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
Install ruby-build as a rbenv plugin
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Install opensssl (the ruby install fails if I don't do this)
sudo apt-get install libssl-dev
Install ruby
rbenv install 2.0.0-p247
Set my ruby version
rbenv global 2.0.0-p247
Install rails
gem install rails
This fails with
Fetching: i18n-0.6.5.gem (100%)
Successfully installed i18n-0.6.5
ERROR: While executing gem ... (OpenSSL::SSL::SSLError)
SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: wrong version number
So apparently, there's still something not quite right with the ssl lib? Either that or I've taken a wrong step somewhere? Please help, thanks!
I am pretty new in linux world.
I was having exactly the same problem after following the same steps.
In my case it got solve just doing:
gem update --system
After that the rails installation gave me no prob.
Hope is just that!
I'm running rails 4 with ruby 2.0 on Linux Mint 15.
I did:
sudo apt-get install git
sudo apt-get install curl
curl -L https://get.rvm.io | bash -s stable --ruby
sudo apt-get install git-core
source ~/.rvm/scripts/rvm
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts /rvm-installer)
rvm autolibs enable
rvm reload
rvm requirements
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
rvm install ruby-2.0
curl -L https://get.rvm.io | bash -s stable --rails
and it worked for me. Maybe this helps
I'm having a trouble installing rvm ROR on my machine using ubuntu 12.04
here are the outputs I'm getting:
Output #1:
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.04/i386/ruby-1.8.7-p371.Continuing with compilation.
Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for ubuntu, might require sudo password.
and at the end of the line of update I get this:
Output #2:
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
Try running sudo apt-get update separately on a command line. Your Ubuntu might be old and its repositories could be out of date. So apt-get update itself is maybe not working in your machine.
To step over that issue, run the following commands:
# Disable RVM from trying to install necessary software via apt-get
rvm autolibs disable
# Then try installing Ruby:
rvm install 1.8.7
If you still face errors, see if you can directly do apt-get install without doing apt-get update (which fails):
# Try to see if you can manually install the necessary software
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
If that's also not working, then paste your apt-get update output.
Why does RVM, Ruby or Rails need libc6-dev, ncurses-dev and libtool ?
on Ubuntu running rvm requirements gives us:
Requirements for Linux ( DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10" )
NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
This is the original / standard Ruby Language Interpreter
'ree' represents Ruby Enterprise Edition
'rbx' represents Rubinius
bash >= 4.1 required
curl is required
git is required (>= 1.7 for ruby-head)
patch is required (for 1.8 rubies and some ruby-head's).
To install rbx and/or Ruby 1.9 head (MRI) (eg. 1.9.2-head), then you
must install and use rvm 1.8.7 first.
Additional Dependencies:
# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:
ruby: /usr/bin/apt-get install build-essential openssl libreadline6
libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev
libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf
libc6-dev ncurses-dev automake libtool bison subversion pkg-config
# For JRuby, install the following:
jruby: /usr/bin/apt-get install curl g++ openjdk-6-jre-headless
jruby-head: /usr/bin/apt-get install ant openjdk-6-jdk
# For IronRuby, install the following:
ironruby: /usr/bin/apt-get install curl mono-2.0-devel
Why does RVM, Ruby or Rails need libc6-dev, ncurses-dev and libtool ?
For the other packages, as far as i can make out:
build-essential automake bison autoconf pkg-config is useful for compiling from source
libreadline6 libreadline6-dev is needed for irb's readline support
openssl libssl-dev is required for ruby's SSL support
curl git-core subversion is required for fetching software
zlib1g zlib1g-dev is required for unpacking rubygems
libyaml-dev is required for ruby's YAML support
libsqlite3-dev sqlite3 is required for sqlite support for rails
libxml2-dev libxslt-dev is required for parsing XML via nokogiri
Want to know why RVM added them in the first place?
What well known libraries will break if any of these packages are not installed?
Which of these packages are necessary for ruby itself to be installed and which of them are needed for a stdlib ie. yaml or rexml ?
EDIT: forgot pkg-config
EDIT: added some more questions at the end
ruby comes with a set of extensions, some of them require additional packages, for example ncurses is needed for better console support (irb) - but is not required, pkg-config is needed for packages searching - most packages expose a configuration file which helps in finding proper paths for compilation ... and so on, here is list of all extensions: https://github.com/ruby/ruby/tree/trunk/ext ... although it's not the list of requirements - i can not find official ruby list of requirements.
libc6-dev are the C standard library development files. It's very unlikely that any useful C code would compile without them. As Ruby is written in C, those are needed to compile and build ruby itself.
I would guess that ncurses is needed to compile irb.
I would agree with the purpose of the other packages you mention.
These are all basic libraries which are dependencies for various gems you will use in future.
build-essential openssl libreadline6
libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev
libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev
autoconf libc6-dev ncurses-dev automake libtool bison subversion
There may be a case like you will not require all the libraries in you m/c, though when you will install some gems, errors like
cannot build native extension
In those cases the required libraries are looked upon for the failed gem and installed. Libraries are installed only once and are totally different as compared to gems. The libraries present here are for
Git, mysql server, sqlite, curl etc.
I would suggest to install it in the beginning with sudo permissions using Sudo apt-get install. Hope this helps. Also as you try out new gems and plugins, you would be installing new libraries in future.
I installed ruby-1.9.3-p0 on my Ubuntu 11.10 wubi and then rubygems to get Rails set up.
This is my code:
sudo ruby setup.rb
I got this error:
"/usr/local/lib/ruby/1.9.1/yaml.rb:56:in'<top(required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby."
I installed libyaml and reinstalled Ruby but still it doesn't work.
The information changed and I have no idea what's wrong with it.
You must install the paquage libyaml-dev before installing ruby, if not you can still use extconf.rb for the missing library. So for this problem you can do (from the ruby install folder) :
cd ext/psych
ruby extconf.rb
make
make install
Extconf.rb is usefull for adding a library after have installed ruby.
Do the following:
you must have "curl" installed :sudo apt-get install curl
Go To this link RVM
Copy the command in the quick install box and Paste it in your command prompt
Type echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
Type ~/.bashrc
Type the following code:
sudo apt-get install build-essential libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
Type: rvm install 1.9.3-p0
Type: rvm use 1.9.3-p0
Type: gem install rails
Have fun :)
Ok, after a failed attempt at installing RoR on my Ubuntu 11.10 box, I combined the tips from this page and from this resource: http://www.thegeekwork.com/how-to-install-ruby-on-rails-in-ubuntu-11-10/
This is the breakdown, step-by-step of what I just did to make this work (sorry if I didn't format this so great, I was just trying to keep it neat):
1) Fresh install of Ubuntu 11.10
2) me#Box:~$ sudo apt-get install curl
3) me#Box:~$ sudo apt-get install git
4) me#Box:~$ sudo apt-get update
5) me#Box:~$ sudo apt-get dist-update
6) me#Box:~$ sudo shutdown -r now
7) me#Box:~$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
8) me#Box:~$ gedit ~/.bashrc
9) add the following line to the end (and save the file)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
10) me#Box:~$ source ~/.bashrc
11) me#Box:~$ type rvm | head -1
After executing above command you should be getting this output -
rvm is a function
You’ve successfully installed the RVM. Next, you are supposed to install additional dependencies. To find out those programs type -
12) me#Box:~$ rvm requirements
After the above command, install the additional packages recommended by RVM -
13) me#Box:~$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
14) me#Box:~$ rvm install 1.9.2
(#14 takes a little while)
15) me#Box:~$ rvm use 1.9.2
(This selects the version you want to use)
(If you aren’t sure about the ruby version currently being used, then type -
ruby -v)
16) me#Box:~$ gem install rails
(this will take a little while...)
17) Make a sample application as a test...
me#Box:~$ rails new test_app
me#Box:~$ cd test_app
me#Box:~/test_app$ rails server
AND THAT"S WHERE THIS THING DIDN"T WORK. ARRRRRRRRRrrrrrrrrrrrrrgh.
So,
18) in your application folder ("test_app"), open Gemfile and uncomment "therubyracer" line
19) me#Box:~/test_app$ bundle install
20) me#Box:~/test_app$ rails server
Done, and done.
I don't understand why it set 0.0.0.0:3000 as the host address (I thought it would be 127.0.0.1), but quite frankly, that's not bothering me right now -- I got it to work (so far). Time to get going with some Rails! :D
I hope this helps anyone else who is looking to make this work! :)
Note: I realize that #13 repeats some of the things I already installed, but I don't care, I'm just doing what the thing says. :/
Note2: Holy learning curve on just posting an answer! I wasn't sure what was considered "code" and apparently the prompt is considered code. Makes sense now :)
Note3: This is my first "Answer" on StackOverflow! :D
If you are compiling ruby you might need libyaml-dev
Debian (and Ubuntu, etc.) packages that contain the files needed to install some other program from source usually end in -dev, e.g. libyaml-dev, so try installing that. Or just use rvm, it will actually install this for you.
Compling yaml from its source will make it work. I am running the same config as yours. I followed this http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/. It definitely works.