Cainã
Cainã

Reputation: 955

How to install complete Ruby on Rails environment in Ubuntu 12.10 that already have XAMPP installed?

I have XAMPP (Apache + MySQL + PHP) installed on my computer and I wish to begin using RoR and possibly keep XAMPP. Is there any way to use both in one computer?

I have many questions about Ruby on Rails:

Thanks.

Upvotes: 0

Views: 8690

Answers (2)

Tom Harrison
Tom Harrison

Reputation: 14018

The equivalent to Apache for RoR is ... apache! In development, most of us use webrick which you run with the rails server command (or rails s for short) from the root of your project, then access from a browser with "http://localhost:3000". If you wish to use your existing XAMPP version of Apache, you'll need to configure it to listen on some other port than your PHP app.

You can use your existing MySQL installation. Or if you're just getting started, a default rails app starts out with SQLLite, which is a simple, file-based RDBMS that's fine for a while to get going. You can use MySQL, but it will require a little configuration in your database.yml file. "Best" database is probably MySQL because that's what most people use; I personally have a strong preference for PostgreSQL, but it's just because it's a far better database :-).

RoR 3.x supports CoffeeScript and SASS; ruby gems install the needed binaries to compile both into JS and CSS respectively.

The "best/simplest" installation on Ubuntu is to follow the few steps here: http://rubyonrails.org/download:

  • install ruby if not already installed (apt-get install ruby1.9.3)
  • install rubygems if not already installed (apt-get install rubygems)
  • install rails gem install rails

Upvotes: 4

Dave Newton
Dave Newton

Reputation: 160181

Personally, I'd use https://rvm.io/, especially when getting started. (There are other options.)

There is no "best DB for Ruby", but MySql and PostgreSql are popular for obvious reasons.

Rails can be self-hosting using webrick, or you can hook it up to a real server, or use Thin, or... But for getting starting, IMO normal rails s running webrick is fine.

Once you've installed Rails and installed the required bundles, CS/SASS/etc. are all there.

Most tutorials include getting started, have you considered just doing something like that, like http://ruby.railstutorial.org/ or similar?

Upvotes: 1

Related Questions