I'm a fan of using Window Batch to automate repetitive tasks, so put together a little script that launches all the components of my Rails development environment.
On my system, all my Rails applications are stored in a base directory, along with a folder containing the following batch scripts. To launch the development environment for a particular Rails application, I can simply supply the batch file with the name of that application.
Each batch file contains the command to launch that component:
Assorted notes on my development experiences, and other useful workflow and environment tips, for Windows and Linux.
Pages
▼
Tuesday, 17 January 2012
Thursday, 12 January 2012
Starting up my Ruby on Rails Development Environment
- Open a command prompt and navigate to project directory.
- Start Spork server:
- bundle exec spork rspec
- Open a second command prompt and navigate to project directory.
- Start Autotest:
- bundle exec autotest
- Open a third command prompt and navigate to project directory.
- Start development server:
- rails server
- Open a fourth command prompt and navigate to project directory, use this for Git operations while working.
- Open code IDE/text editor of choice (mine's currently Komodo Edit 6.1)
- Start working on RoR application!
I'm currently looking at ways to automate this startup procedure, possibly using a batch file or similar - any suggestions? Update: Post detailing startup using Windows batch scripts here
Monday, 9 January 2012
Thursday, 5 January 2012
Creating a Rails Application from Scratch
- Navigate to base Rails applications folder and execute:
- rails new newAppName -T
- The -T prevents rails generating Test::Unit files - we'll use RSpec
- Copy/create three required files from a base application:
- .autotest
- .gitignore
- Gemfile
- Install new gems with:
- bundle install