Setup Ubuntu 13.04 Raring Ringtail Discussion
when installing ruby using rbenv, at the step of "rbenv install 2.0.0-p195", it shows the results below:
Inspect or clean up the working tree at /tmp/ruby-build.20130612202212.21299
Results logged to /tmp/ruby-build.20130612202212.21299.log
Last 10 log lines:
checksum mismatch: ruby-2.0.0-p195.tar.gz (file is corrupt)
expected 0672e5af309ae99d1703d0e96eff8ea5, got 9c6ff20645c3da426ade1bceb2e696b9
Looks like the ruby 2.0 tarball is corrupt. You can try downloading the ruby 2.0 source tar.gz file and saving it to ~/.rbenv/cache like they suggest here: http://stackoverflow.com/qu...
Let me know if that works for you! It could also be curl causing a problem or a network issue.
Thanks Chris, but as I am new to setting up environments on linux, I couldn't figure out what to do to install ruby 2 from source. I installed ruby 1.9.3 as I will continue with the tutorial at : http://ruby.railstutorial.o...
Thanks for help! :)
Hello and thank you very much for your guide!
I followed all the steps mentioned on my ubuntu 13.04 amd64 laptop.
it seems everything installs correctly, but when I get to "rails -v" to check if rails is installed I get the following:
The program 'rails' can be found in the following packages:
Try: sudo apt-get install <selected package="">
I have done some research but I am not sure what this is. if you have any suggestion I would appreciate it, and thank you anyway!
Did you use rbenv? Make sure you run
rbenv rehash if you did, this command makes sure that the executables it installs are available to your user.
Thank you Chris for the super fast reply!
for some reason I had to set again
rvm use 1.9.3 --default
and repeat the other steps.
I am not sure why.
It all works now!
Nice site, thanks.
It would be pretty awesome if you would put it on GitHub so we can do a pull requests ;)
ruby-build can be installed in one line like this:
git clone https://github.com/sstephen... ~/.rbenv/plugins/ruby-build
instead of creating and cd-ing into directory
Had a problem following the "Using rbenv" section. 'rbenv install' didn't work as it wasn't included in the plugins dir being cloned from GitHub to Ubuntu (at least for me).
Might want to add '/ruby-build/' to that command (or as the next line) to ensure that install does work.
Un excelente tutorial, aunque deberias mencionar que hay que crear las base de datos, o bueno no se si ahora es necesario crearlas y configurarlas myapp_test; myapp_production; myapp_development ya sea para mysql o psql......
En definitiva gracias por el tutorial excelente aporte para las personas que estamos comenzando en este mundo de rails
When I try to run: "cat ~/.ssh/rsakp01.pub" I receive a no such file or directory error. I checked that the file is in the specified folder...
Following the instructions to a "T" ended with me getting Rails 4.0. Not sure, but I have had a heck of a time getting either Postgres or MySQL apps running. I am in an endless loop of errors after starting the rails server and visiting the localhost:3000 site.
Does Rails 4 have a different setup for MySQL than what is above?
I know the feeling. :) So if you go with MySQL, you need to update your database.yml to use the "mysql2" adapter and install the "mysql2" gem with your Gemfile. By default it's going to use sqlite3. You should be able to run fine with sqlite3 so it shouldn't be having any errors. Does your log/development.log file contain any info that might help debug what's wrong?
Chris, thank you for the quick reply.
I'll have some time tonight to take a look and ensure all settings in yml file and gemfile are correct. I'll also dig into the log files to see if I find anything in there too.
Hey Chris...sorry about the late reply, but I was able to get everything going after changing from Rails 4 to Rails 3. Go figure. :)
This is pretty exciting because I'm working on my first application of any kind since college. Forgot how much I liked programming. Your post on multiple databases and migrations is helping me through my next little road bump.
Keep up the great work with this site and excid3!
That's fantastic to hear! :) Programming really is a blast and I'm glad you got Rails 3 going. You'll be able to upgrade it later on fairly easily anyways. Good luck with everything and let me know if you have any more questions!
I followed the steps but when i run ruby file in geany or scite editors in linux it does not run. Error message like ruby not found. It will run if i use the terminal to run the ruby file. help please?
I think it's likely that the editors are looking for the Ruby executables. rbenv and rvm both install hooks into the shell so that you can switch between active Ruby versions. The editors most likely don't execute your shell configuration so it doesn't find them. My suggestion in this case is to choose the version of Ruby you're planning on using and find their binary inside either the .rbenv or .rvm folders inside your home directory. That way it can find the executable directly without having to jump through one of the managers.
no need to answer figured out the solution. :)
i just need to put in my script in the build in external tool of gedit:
Thanks for one of the most straightforward, current, simple and complete guides. Just one thing as it seems rails has moved to 4.0.0 is that I had to install bundler and update. Now "rake server" is working with Rails 4.0.0 and mysql2:
gem install bundler && bundle update
I encourage you to update your guide for 4.0.0 :-)
rbenv install 2.0.0-p247
Inspect or clean up the working tree at /tmp/ruby-build.20130814225651.28393
Results logged to /tmp/ruby-build.20130814225651.28393.log
Last 10 log lines:
installing default gems: /home/piavgh/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0 (build_info, cache, doc, gems, specifications)
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?
After "rbenv install 2.0.0-p247" I get this. Did I miss something?
It sounds like you're missing the openssl lib and that's causing it to fail. Can you check to make sure you have libssl-dev installed?
Thanks so much. I was using rvm usually. But rbenv is excellent. no errors. Mine is a chinese laptop worth only 160 euros including shipping. I am using ubuntu 12.04 lts. My earlier trials for instling rails 4 and ruby 2 ended up unsuccessfully. Next I need to install rspec. Last month it created a problem with these new versions of ruby and rails. hope it ends in success.
Thanks for this guide. I followed step by step and chose MySQL install instead of PostgreSQL
Visiting http://localhost:3000 gives me the following error:
Access denied for user 'root'@'localhost' (using password: NO)
That's saying that your database connection to the database isn't working. You may have specified a password when you installed MySQL or a different username than root. Update your database.yml to specify the database, make sure you have the mysql2 or pg gem installed in the Gemfile, and you'll be good to go.
Day one learning for me so appreciate your quick response Chris.
When I configured MySQL, I did set a password but with the default username. Was the database.yml suppose to include this information automatically or do I have to go back into it and insert the password.
No, actually you have to set it up. That's sort of where my tutorial leaves off I guess.
gem "mysql2" to your gemfile, change the adapter in database.yml to
adapter: "mysql2" and add a
password line that has the database password. Run
bundle install and restart your Rails app and you should be good to go!
You may also need to run rake db:create to have Rails create the database for you.
why does using "curl -L https://get.rvm.io | bash -s stable"
throws error "curl: (56) Received HTTP code 407 from proxy after CONNECT"
Note: I correctly set proxy address, username and password from terminal and was able to successfully update using "sudo apt-get update" thereby ensuring my internet working.
Sounds like curl isn't able to authenticate with your proxy. You might just try adding the proxy credentials into the curl command. You can run
man curl in terminal to get the docs on it.
Chris, it's rare to find instructions that are brief but functional and easy to follow--great job. I was up and running in less than 30 minutes. If only I could learn Ruby and Rails that quickly! As a long time Java developer, I'll have a lot of adjustments to make. Thanks so much for helping me get started with a frustration-free installation.
Thanks for the kind words Nes! I've been planning how we're going to do the Rails content with the same sort of clarity and we will definitely be taking you along step by step. Hop on the mailing list and I'll be sure to let you know when they are out. :)
Inspect or clean up the working tree at /tmp/ruby-build.20130909154456.11617
Results logged to /tmp/ruby-build.20130909154456.11617.log
Last 10 log lines:
Cloning into 'ruby-2.1.0-dev'...
/tmp/ruby-build.20130909154456.11617/ruby-2.1.0-dev /tmp/ruby-build.20130909154456.11617 ~
/home/surya/.rbenv/plugins/ruby-build/bin/ruby-build: line 393: autoconf: command not found
why was it ??
Great tutorial - working setup on xubuntu 13.04 with postgres, couple of points I needed to change
after creating user i couldn't create a database, needed to login into psql and
alter user chris with superuser
also the line
rails new myapp -d postgres
rails new myapp -d postgresql
One thing I'm not going to post is any of the problems I had getting this installed, even though there were one or two minor issues that cropped up that require a little Google "intuition". What I am going to say is that this post made my life so very, very, very much easier getting up and running. And for that you have my thanks and plenty of it.
this method works great (thank you very much!!! i needed it to compile my university's thesis!), but i have a little problem:
when i go to type "gem install rails", the system give me this output:
"Succesfully installed rails-4.0.0
1 gem installed"
and it's ok
and then, when i check the version with "rails -v":
how can i resolve this?
Make sure you haven't installed Rails from another method. It seems as if you've got two copies of Rails installed.
I've just removed RoR from my Ubuntu 13.04 for installing update version of RoR. But how can I be sure that its completely removed?
When i'm trying to setup my ubuntu 13.04 gives me this !!! what should I do?
"Downloaded archive checksum did not match, archive was removed!
If you wish to continue with not matching download add '--verify-downloads 2' after the command.
There has been an error fetching the ruby interpreter. Halting the installation."
First of all it is a great tutorial brother i just want to confirm that after installing rails when i check rails version it shows 2.3.14 i try to re install rails it shows that "successfully installed rails 4.0.0" but again the version is 2.3.14. I am new to rails so please help me how to sort out this problem.
Listen!!!! I have been work for three plus years supporting a Rails server and application and your instruction were bang on!. I knew where the typos were, and made the required changes. I could not have asked for a better set of instructions.
Thanks a million
I'm using rbnev,
At the step of: "$gem install rails", i get this type of error: "Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (https://bb-m.rubygems.org/q...".
By the way, if you're using this guide to set up a dev environment on a version other than 13.04 or 14.04 (I was using 10.04) be careful not to add this repository:
sudo sh -c "echo 'deb http://apt.postgresql.org/p... precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
when installing PostgreSQL 9.3. It will break your packages since it installs libs from Ubuntu Precise on your 10.04 installation. In this case I had to purge the installed packages and do a "sudo apt-get update && sudo apt-get dist-upgrade" to resync my packages to the correct version. Besides that, the rest of the guide works pretty good on 10.04.
I found this article very informative,it is very helpful for getting rails installed.
Thanks for sharing.