Pages

How to set up ( Fedora php ruby on rails )

Saturday, October 2, 2010

Ruby On Rails 3 on Fedora 14

Fedora 14(Laughlin) and Rails 3


This post will just let you install only on version of rails on your Fedora 14 that is rails 3 but first we will install rails 2.3.8 from fedora repository. Keep in mind you will able to run only one version of Rails with this method and if you want to run multiple version or installtion than you need to follow on of my old post in which i have used RVM for manging different version of Ruby and also Rails.
Installing and setting up Rails 3 on Fedora 13 (Ruby on Rails 3 RC)


First Installing Ruby 1.8.7 with Rails 2.3.8


[ismail@localhost ~]$ sudo yum install rubygem-rails ruby-devel mysql-devel-y

Now you have running version rails 2.3.8 without mysql database support for rails


Adding mysql rails and ruby support


[ismail@localhost ~]$ sudo yum install ruby-mysql -y

Note: Now you can stop following if you don't want to install rails 3 on fedora 14


upgrading to Rails 3


[ismail@localhost ~]$ sudo gem install rails

If all went cool than you have running version of rails 3 on fedora 14 now create an application and run bundle install to test your installation


[ismail@localhost ~]$ rails new my_app -d mysql
[ismail@localhost ~]$ cd my_app
[ismail@localhost ~]$ bundle install

Have fun with Rails 3 on Fedora 14

14 comments:

  1. Exellent !!! thanks a lot.

    ReplyDelete
  2. I'm trying this on a brand-new Fedora 14 install, and I get to the last command before I get the error:

    Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

    /usr/bin/ruby extconf.rb
    mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h

    Any idea what could be causing this?

    Thanks,
    Jason

    ReplyDelete
  3. Thank you very much!

    ReplyDelete
  4. ANd got error

    sudo gem install rails
    .....

    Installing ri documentation for bundler-1.0.7...
    Installing ri documentation for rails-3.0.3...
    File not found: lib

    ReplyDelete
  5. Hi Sergej,

    you just need to create directory lib in following folder:

    cd /usr/lib/ruby/gems/1.8/gems/rails-3.0.3

    mkdir lib

    sudo gem install rails

    Now all will work fine :)

    ----------
    Manoj Kumar
    http://www.techtitude.in/

    ReplyDelete
  6. I spend some nights to understand where I fail in my installation procedure.
    Thanks Manoj to clear the mystery of the lib folder lost.
    Now I can sleep better :)

    ReplyDelete
  7. I get this kind of message:
    ERROR: Error installing rails:
    i18n requires RubyGems version >= 1.3.5

    How can I fix that?

    ReplyDelete
  8. "i18n requires RubyGems version >= 1.3.5

    How can I fix that? "

    gem update --system

    ReplyDelete
  9. I had the same problem.

    Here is my adventures (hope it will be useful):

    To fix it I've done many manipulations :-)

    I'm using Fedora Core. I've fixed it this way:

    I've installed rails-devel:

    sudo yum install rails-devel

    tried again:

    sudo gem install rails

    but I've got another problem:

    Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb creating Makefile

    make gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fno-strict-aliasing -fPIC -O3 -Wall -c parser.c make: gcc: Command not found

    So I've installed GCC:

    sudo yum install gcc

    tried again:

    sudo gem install rails

    Now I've got another problem ))) :

    Installing ri documentation for json-1.6.3... ERROR: While generating documentation for json-1.6.3 ... MESSAGE: no such file to load -- irb/slex ... RDOC args: --ri --op /usr/lib/ruby/gems/1.8/doc/json-1.6.3/ri --title JSON implemention for Ruby --main README.rdoc ext/json/ext ext lib README.rdoc --title json-1.6.3 Documentation --quiet

    So installed ruby-irb:

    sudo yum install ruby-irb

    tried again:

    sudo gem install rails

    Successfully installed rails-3.1.3

    That's all )))

    ReplyDelete
  10. I just a want to thanks for writer. That is really helpful.The quality of content is fine.The code is clearly explain it.

    ReplyDelete
  11. Nice info, I am not aware of these things... Thanks for sharing such quality info.

    ReplyDelete
  12. Great information shared. Ruby on Rails Development in India and there are many times were we face the installation problems. But we have technical team who solve these problem it will be a great help from your to my technician team so that their work will be easy for them. If anyone is looking for ROR developers and wanted to build there site in ROR or wants to integrate bitcoin payment gateway in their existing site contact us at: info@cryptextechnologies.com

    ReplyDelete
  13. Great post, thanks a lot for sharing. If you are looking for company who work for Ruby on Rails Development in india then Cryptex Technologies is the best company for you. If you need any help from us email at: info@cryptextechnologies.com

    ReplyDelete
  14. Thanks for sharing such a great information. Ruby on Rails acts as an open source and a rapid type of web development framework that works with a continuous goal to maximize both productivity and efficiency of developers. Today, the technique has become the strongest backbone for large numbers of web applications and succeeded to obtain incredibly passionate and vibrant communities. We build scalable robust secured web app on ror, we pay due stress on error free development. Our ruby on rails in india developer maintain code version with the help of tools.

    ReplyDelete