Ruby on Rails application: zero to Welcome page


1. First of all you need to download Railsinstraller exe kit from : Download Rails Installer

2. Install Railsinstaller software in your computer.

3. After successful installation it will create a folder automatically name as “Sites” at C:\ drive .

4. Open command prompt and go to “C:\Sites\” folder

5. Now you need to create a rails application, using the command “rails new app_name”

6. It will generate a rails application automatically with bundle install.

7. Now go to your project’s root folder . example : ” C:\Sites> cd app_name”.

8. Now you need to run the rails server and type the command for example: ” C:\Sites\app_name>rails s”.

9. Wait a few minutes and rails server will start. leave this command prompt without closing.

10. This is the time, to browse your first rails application and open your browser and browse as: http://localhost:3000

 

Rails applicaion welcome page

 

11. Some rails command

* To check ruby version type : ruby -v
* To check rails version type : rails -v
* To check gem list type : gem list
* To update your gem list type : gem update
* To manage bundle install type : bundle install
* To manage your database migration type : rake db:migrate

Advertisements

Deploying wordpress blog inside Ruby on Rails application


To Enable WordPress blogging system in Ruby on Rails application is now pretty easy and tension less. Just follow the steps…

1.First of all make sure that your server can parse both php and rails application.

2. Make a blog directory in side the public folder of rails application.

3. Deploy all WordPress content inside blog directory.

4. Configure your database connection at wp-config.php file .

5.Then just paste the following code in the virtual host config file

  <VirtualHost ...>
      ServerName ...
      DocumentRoot ...
      <Location /blog>
         PassengerEnabled off
         <IfModule mod_rewrite.c>
           RewriteEngine On
           RewriteBase /blog/
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteCond %{REQUEST_FILENAME} !-d
           RewriteRule . /blog/index.php [L]
         </IfModule>
      </Location>
  </VirtualHost>