Learning Rails part 4: Integrating bootstrap

One of the coolest frameworks since the existence of web frameworks is Bootstrap, at least if you ask me what would be the coolest framework to work with. It doesn't solve all your CSS troubles, but it gives you a very good basis on which to build your software.

Bootstrap is in no way related to Rails apart from the fact that Rails ultimately generates HTML pages. There is however a ton of neat gems out there that you can use to integrate Bootstrap into your rails application and super charge the application with some of the best UI stuff out there.

Learning Rails part 3 - Using RSpec

So I've been going at this Rails things for a few days now and I learned a lot. One of the things I discovered is how you can make developing applications easier in Rails with the help of some test-driven development techniques.

There's a lot of stuff you can do to test your application. The lazy method would be to invest your time in manually testing your application. There are however plenty of other options that will save you large amounts of time. I've tried a few things myself and I learned that there's really no need to manually test your rails applications. 99% of all test work can be done fully automated.

Learning Rails part 2: Guard yourself

After working a few days on my project in Rails I learned something. Having to work with the terminal to execute commands against your Rails project is nice, since you can do some crazy stuff. It's also the most annoying thing ever.

I like to live preview my work on the UI. Which means that I have a terminal running the rails server. Because that terminal is running the rails server, I need another one to execute all the other stuff to get new controllers, views, specs, features, etc. I'm okay running two terminals, but there's a probably a better way.

Learning Rails part 1: Things to get you started

<p>After developing .NET for a long, long time I felt the need to try something completely different. </p><p>Googling around the internet I had seen Ruby on Rails quite a few times already in the past few years. But back when it started I didn't exactly feel the need to learn a new language. But after hearing more about it on BubbleConf and other places I decided, what the heck, why not give it a shot and see where this takes me.</p><p>In this blogpost and in the next few blogposts I'm going to show you what I'm doing to learn Rails and how you can start building rails apps too.</p><!--more--> <h2 id="how-this-series-work">How this series work</h2> <p>There's basically two approaches to learning a new language or thing. You can read a book about it and then start working with it. Or you dive in head-first and start building something and read books afterwards.</p><p>Depending on your personality, you may or may not like my style of learning. I am a hacker and I can only learn things inside-out when I get my fingers on them and break stuff ;-)</p><p>You have been warned! I will not explain theory in these blogposts, just some nice ways of doing things. I will point you to other blogs and manuals, but you will have to read them yourself if you are into such things.</p> <h2 id="getting-the-goods">Getting the goods</h2> <p>To start learning/building with Rails you need a few little things:</p> <ul> <li>An installation of Ruby on your machine </li><li>A text editor (there's quite a few good ones out there)</li><li>Git (because you are going to break stuff)</li><li>The Ruby on rails gem</li></ul> <p>You can download Ruby from the following locations:</p> <ul> <li><a href="http://rubyinstaller.org">http://rubyinstaller.org</a> (Windows)</li><li><a href="http://net.tutsplus.com/tutorials/ruby/how-to-install-ruby-on-a-mac/">http://net.tutsplus.com/tutorials/ruby/how-to-install-ruby-on-a-mac/</a> (Mac)</li></ul> <p><strong>Pro tip(tm):</strong> Install the devkit too if you're on Windows. You can find it here: <a href="http://rubyinstaller.org/add-ons/devkit/">http://rubyinstaller.org/add-ons/devkit/</a></p> <p>For mac users, make sure you install the Xcode command line tools. To do this you need to execute the following command in a terminal:</p>

xcode-select --install

<p>And the tools will install itself.</p><p>After you have installed Ruby on your system, you should be able to get the Rails gem installed. Start the terminal and execute the following command:</p>

gem install rails

Getting a proper version of Ruby running on your Mac.

Since a few months, I switched completely to apple hardware. Reason being that I develop mobile apps including iOS apps, which require you to have a mac. It's been a very fun transition, I learned a lot of new stuff that inspired me to do things a little different on Windows as well.

One of the things I learned is how to use ruby for building test scripts and small utilities. Why ruby? Well, it's easy to learn. Also, it's used in the test tools I use for testing my Xamarin based apps. When you want to run Calabash tests, you have to know a little bit about Ruby development. Now this may sound like it was a breeze to get everything working, but trust me, it wasn't so trivial when I started using these tools.<!--more--> <h2>The update story of Apple</h2> Using ruby to run tools like Calabash on Mac OS X is a bit problematic. Apple does support Ruby out of the box on every apple machine. However, the version that you get with the box is old. The ruby community has moved on to version 2.0.0 while Apple is stuck on 1.8.2 on my machine. This means that several tools that use Ruby no longer work on Mac OS X.