Tag Archives: Rails

Rails – Setup Devise for Rails

Devise is a Rails gem which could help you managing the authentication of your Rails project.

This post followed the steps in Railscasts – Introducing Devise. I made my own notes here such that i don’t need to watch the tutorial again. It is highly recommended to go through the video. Continue reading Rails – Setup Devise for Rails

Rails – Stop the Rails Web Server by Command

The following command could start the Rails daemon server for you Rails web application.

  • rails s

 

Stopping the web server could be done by simply enter the Ctrl + C command in the terminal. But if your terminal session is disconnected, you have no way to stop the service. In that case, you have to kill the process directly. Continue reading Rails – Stop the Rails Web Server by Command

Rails – Running RSpec with Spork Test Server

I am still continuing the tutorial @ Ruby on Rails Tutorial by Michael Hartl

Last time we have integrated the RSpec and Autotest in Rails 3.
Rails – Integrate Autotest and RSpec in Linux
 

But it seems that it takes quite long for RSpec to complete the tests. This is because RSpec reloads the entire Rails environment for each run. Spork Test Server helps you preloading the Rails environment which greatly reduces the time for running the test suite.

1. Add the spork gem in the Gemfile Continue reading Rails – Running RSpec with Spork Test Server

Git – Initialize your Local Git Repository

Rails project works well with Git. A .gitignore file can be found in a freshly created Rails project. It would be good to setup the local Git repository before you start the development.

1. First, install Git

  • apt-get install git-core

 

2. Setup your Git user account.

  • git config –global user.name “Your Name”
  • git config –global user.email youremail@example.com

Continue reading Git – Initialize your Local Git Repository

Notepad++ – Explorer Plugin

As i want to develop a Rails application, i would like to have an editor like TextMate which i can use in Windows. It seems that Notepad++ would be a good option but it does not have a project explorer for me to switch the files.

Luckily, there is a Notepad++ plugin called Explorer where you can add the project explorer view.

1. Download it from Notepad++ Explorer Plugin.
 

2. Extract the archive and put the .dll file into <Notepad++>\plugins folder. Continue reading Notepad++ – Explorer Plugin