Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7409479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:05:19+00:00 2026-05-29T06:05:19+00:00

how to make the ruby on rails with mysql environment in ubuntu 11.04. I

  • 0

how to make the ruby on rails with mysql environment in ubuntu 11.04.

I use the

sudo apt-get install ruby

sudo apt-get install mysql-server

Then I try

gem install rails

But I do not know to to install the mysql adapter?

Is there a document which I can follow?


Update:

Now,I install the gems use

gem install rails.

There are no errors.

However when I run

rails -v

I got ‘rails’ is not installed,you can typing sudo apt-get install rails

However when I change to the rails bin directory,and use the ruby to run the rails script,I can get the version:

xx@mac:/$ rails -v
The program 'rails' is currently not installed.  You can install it by typing:
sudo apt-get install rails
xx@mac:/$ cd /var/lib/gems/1.8/bin/
xx@mac:/var/lib/gems/1.8/bin$ ruby rails -v
Rails 3.2.1
xx@mac:/var/lib/gems/1.8/bin$ 

So,it seems that this is caused that the ‘rails’ can not be run directly,how to fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:05:20+00:00Added an answer on May 29, 2026 at 6:05 am

    You’d better use RVM to manage your Rubies and Gems instead of the distro’s Ruby.

    See RVM documentation : http://www.beginrescueend.com/rvm/basics/

    As soon as you have RVM and a Ruby interpreter installed, install the rails gem (with MRI 1.9.2 and a gemset called “your_gemset”) :

    rvm use 1.9.2
    rvm gemset use your_gemset
    gem install rails
    

    Generate your Rails project, then update the Gemfile (in your project directory) : remove the sqlite3 adapter entry and replace it with the mysql2 adapter :

    # Gemfile
    # gem 'sqlite3'
    gem 'mysql2'
    

    Finally, edit your database.yml file with your MySQL configuration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Windows XP. Ruby 1.9.2. Rails installed. MySQL installed. When I try to run gem
OS:     Fedora 13 Question:     The mysql for rails. I inputed the command gem install
After updating MySQL to 5.5 using apt-get, the mysql2 gem stopped working. Here's the
Since I've migrated from Leopard to Snow Leopard I get $ ruby script/server Rails
I'm using Ruby on Rails to make an application where businesses can create accounts
So I'm creating a plugin for Ruby on Rails to make implemented addresses including
I a newbie trying to write a [Ruby ON Rails] spec to make sure
I am using Ruby on Rails 3.2.2 and rspec-rails-2.8.1. In order to make my
I want to make a development server for Ruby. (I have done this for
I'm trying to get a Ruby on Rails project started on Dreamhost, ruby version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.