Setup Ruby On Rails Development Environment
Setup Ruby On Rails Development Environment
Its time to install Rails 5.0.1 without ri and rdoc (which you actually never use)
gem install rails --version 5.0.1 --no-ri --no-rdoc
Running the following command to make sure Ruby on Rails has been installed successfully
rails new test
cd test
rails s
Open browser, visit: http://localhost:3000, if an web page is open then you are success.
Since Rails ships with so many dependencies these days, we're going to need to install a
Javascript runtime like NodeJS. This lets you use Coffeescript and the Asset Pipeline in
Rails which combines and minifies your javascript to provide a faster production environment.
2. Install Git
Install Git
sudo apt-get install git-core
Your email should be the same as your Github account. You may set it differently, but it will
introduce some additional work.
You should use ssh-key to authentication each time you pull from or push to Github.
The next step is to take the newly generated SSH key and add it to your Github account. You
want to copy and paste the output of the following command and paste it here.
cat ~/.ssh/id_rsa.pub
Once you've done this, you can check and see if it worked:
ssh -T [email protected]
You should get a message like this:
Good References:
http://guides.rubyonrails.org/
http://api.rubyonrails.org/
http://google.com
Slide: https://goo.gl/luILrq
IV - MySQL
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
Installing the libmysqlclient-dev gives you the necessary files to compile the mysql2 gem which
is what Rails will use to connect to MySQL when you setup your Rails app.
Learning MySQL: http://student.agh.edu.pl/~gegotek/Learning%20MySQL%20V413HAV.pdf
Introduction to SQL: http://cs.lmu.edu/~ray/notes/introsql/
No SQL: http://cs.lmu.edu/~ray/notes/nosql/
Ruby
https://github.com/framgia/coding-standards/blob/master/vn/ruby/standard.md
Ruby on Rails
https://github.com/framgia/coding-standards/blob/master/vn/rails/standard.md
VI - Others
Install Memcached
sudo apt-get install memcached
Install ImageMagick
sudo apt-get install imagemagick
Install Redis
http://redis.io/download
Devise gem
http://devise.plataformatec.com.br/
Simple example
https://github.com/jayshepherd/devise_example
Install Node.js
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint