How To installing Ruby On Rails 3 (Release Candidate) on Fedora 13
First make sure following packages are installed on you fedora 13 system.(Requires especially if you have installed fedora from live CD instead of DVD)
Do almost every task where possible as normal user instead of super user for this installation
To start installation of Rails 3 on fedora we are using RVM(ruby version manager) so we can use our old stable release as well latest beta on our fedora system
First of all we need to install RVM so lets begin
Now add the following line to your .bashrc file:
Now you need to close termial and start again and run following command:
Above command will reveal the dependencies for installing ruby using RVM cuz it compile stuff and than you can install ruby without any pain with single command:
Now lets install ruby 1.9.2-head cuz rails 3 requires ruby 1.8.7 or greater and 1.9.2 have less bugs than others
Now lets make ruby 1.9.2 as default so we can install rails 3 pre and don't worry you can easily come back to previous version with single command without and pain or problem
Now its time to install Rails 3 its simple to do just issue one command and you are done with installation
Your installation completed but no database support yet so you need to install sqlite3-ruby so you can work with rails 3 beta
Now create your applications in Rails 3. Lets start.....
Now go to newly created application folder
Now we need to run last command(Hope so) so our system fully working with rails
Now Start your rails server
Open your browser and open localhost:3000
Note:
You may face error like activesupport requires ruby >= 1.8.7 try closing all terminal and than tryinggem install rails --pre
again and don't use sudo with this command as it will install in user directory so no need and you can make sure that gem using ruby 1.9.2-head by command gem env
I've been trying for long to install Rails 3 on fedora and atlast i've succeed and if you have errors regarding installing do comment and ya i am missing one thing that is using MySQL instead SQLite and and and ya thats it have fun with rails 3
sir, hope you can help, i am stuck here,
ReplyDeletebash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
as i am behind a proxy, so i try this
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head -p http://proxy:8080)
but i got this
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
curl: (7) couldn't connect to host
100 1142 100 1142 0 0 3195 0 --:--:-- --:--:-- --:--:-- 3195
bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `'
bash: line 1: `!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"'
ReplyDeleteI got it like a breeze... thanks for the tuto!
ReplyDeleteWas going so well until I ran
ReplyDeletegem install rails --pre
bash: gem: command not found
any ideas ?
Woot ! all working now
ReplyDeleteSorry my mistake gem was missing from my path. I had to add.
PATH=$PATH:/usr/local/rvm/rubies/ruby-1.9.2-head/bin ; export PATH
Not sure why it found ruby but not gem - even though they are in the same dir ?
All works , many many thanks! I've spent a while trying to figure this :-)
FYI I was getting an openssl error then I started the server. To fix I had to install openssl and openssl-devel then remove and reinstall ruby using RVM. So 'yum install openssl openssl-devel' then 'rvm remove ruby-1.9.2-head' then 'rvm install ruby-1.9.2-head'. Thanx for this blog...really helped me out!
ReplyDeleteAnother note : as I returned to this post , to use it again I was installing on a machine that had no ruby at all installesdd , I had to install the ruby rpm via yum to get the rvm to build correctly. Once you have done that you uninstall the rpm as its not needed anymore.
ReplyDeleteAlso if you get java script runtime , after running rails s
ReplyDeleteyou may need to add the following to your Gemfile in the app root dir
gem 'execjs'
gem 'therubyracer'
That worked for me