Jump to content

The ultimate community for Ruby on Rails developers.


Confused about the ruby on rails set up


  • Please log in to reply
1 reply to this topic

#1 Ruegen



  • Members
  • 7 posts

Posted 24 February 2014 - 06:07 AM

I'm a little confused with the setup for Ruby on Rails - as I am a beginner I wanted to set it up on my external server and accessed the ruby app install via my cpanel


as I understand it you create an app then install the gem packages you want inside that app - allowing you then edit that app.


I would love to know how you actually edit and add tables, access the ruby system to manipulate pages etc.


I am setting up  bootstrap but will include sql tables eventually and I want ruby on rails to handle all this rather than php.


Do I need software on my PC/Mac to access the server and code with ruby?


I know I can run a local server on my own pc and do all this but no idea on external


Cheers for any help.


(and my name is Ruegen, new to this forum, hi all).

#2 james



  • Members
  • 223 posts
  • LocationLeeds, U.K.

Posted 24 February 2014 - 03:44 PM

Hi Ruegen and welcome to the Forum.

This is a massive topic so I'll try to keep it as simple as possible


Rails is opinionated. That means Rails guides you towards the "correct" approach to the application development life cycle and when I say "guides" I mean it expects and works best when you follow the "Rails way" and when I say "correct" I really mean an established, professional  and good practice approach to development. What seems to be a rather arrogant attitude from the Rails team, "the Rails way" is actually rather professional. Don't fight it! :)


What all this amounts to in the context of your question is that

1) You develop locally

2) Test your app

3) Check code you are happy to release to production into source control

4) Deploy your checked in code to a staging and or production server


There are very very good reasons for this approach and you will see many posts on the net stating very strong opinions that anyone not using source control for a live application is either insane or ignorant. Very strong sentiments and not entirely unjustified and Rails does it's absolute nest to make this process as simple as possible for you.

Whilst Rails strongly guides you in this direction it very definitely allows developers to choose the tools they wish to use.

For source control you will find that Git is the preferred source control tool for the vast majority of developers both Rails and for other platforms, Capistrano is the preferred deployment tool and for running a production server nGinx and Unicorn make an awesome combination. As far as testing is concerned that is a controversial subject so I'll skip that bit for now except to mention that tests are automatically generated for you whenever you use one of the rails generate (rails g) commands and to point you in the direction of one of the most awesome railscasts




None of that really answers your question though but there are railscasts that cover this subject far more eloquently and in far greater detail than I could here so I'll leave you with links to watch the following


http://railscasts.co...loying-to-a-vps - This also covers the basics of capistrano and source control.



To run locally all you need to do is cd in to the root folder of your app and run "rails server" or "rails s" if you don;t like typing too much :) this will launch a webrick server and you can navigate to http://localhost:300...ath_in_your_app


Webrick is automatically installed as part of the Rails gemset installation if you wish to use a different server locally then add unicorn or rainbows or whatever to your Gemfile, bundle install and away you go.


Undoubtedly this may well raise more questions, please feel free to ask away. It may also seem very daunting but the tools once configured and set up massively simplify your life


So develop on your local machine using whatever IDE or editor you prefer, test your code. run your app on your local machine and when you are happy, check into source control and deploy, get used to the pattern of working and you will find yourself with an awefull lot of power at your fingertips.

Tip. If you want a free Private host alternative to github which charges for keeping things private, take a look at bitbucket (https://bitbucket.org)


Good luck and hope this helps!

  • Hammad Siddiqui likes this
Programming is just about problem solving!

Also tagged with one or more of these keywords: setup

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users