Reputation: 955
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:
What is the equivalent to Apache to use RoR?
Is there any package with all I need just like XAMPP, for RoR?
RoR comes with Coffeescript and SASS/SCSS?
Is it possible to use SQL/MySQL with RoR and also what's the best database for Ruby?
What's the best/simplest way to install RoR in Ubuntu?
Thanks.
Upvotes: 0
Views: 8690
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:
apt-get install ruby1.9.3
)apt-get install rubygems
)gem install rails
Upvotes: 4
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