How to create Ruby on Rails Application

  • I am developing RoR applications on Windows 7.
  • Assuming that you installed Rails framework on your system before creating application.

Type rails as shown in screenshot and click on command prompt for Rails framework.

Now being a php developer i already have XAMPP installed on my machine and i want my projects to come under the htdocs.
I created a new directory in htdocs as railrepo to store my rail projects. I am naming my first project as project1.

Check this screenshot for directory structure –

Now under railrepo directory I am creating my First rail project(project1) using new command.

rails new project1

Type this command under your railrepo folder as shown in sceenshot-

Once you are done with files creation, you are expecting this to show on your browser. For this you need to start rails server first. Type this command in the folder you created your application by opening another command prompt window.

Command – rails server

Check the screenshot –

Once your rails server started check the action in your browser, by typing —

localhost:3000

Check the screenshot as well–

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s