Showing posts with label ruby on rails. Show all posts
Showing posts with label ruby on rails. Show all posts

Thursday, November 6, 2014

Three parts of a web page

As far as I see there are three components of a web page:

1. HTML
2. CSS
3. Javascript

There are different libraries, frameworks and gems dealing with these three aspects. So far, in each of these three areas, I have identified following things that I need to learn, step by step:

HTML: HTML5
CSS: Sass, bootstrap
Javascript: jquery, coffee script

I will keep adding other stuff to this list as I realize or as I come across them.

Tuesday, November 4, 2014

Re learning RoR

I did web development using RubyOnRails for a year after I graduated in 2006. Back then there was not a lot of documentation about it and we had to learn lot of stuff using trial and error. I havent lot of development in RoR since then but now I want to do some serious web development and RoR seems an obvious choice since it is very popular and because I know it a little. So I have started re-learning it. I am going through Ruby On Rails Tutorial book and I intend to finish it. Many things are new and at times it feels too much to even remember all the different frameworks/libraries that keep poping (Saas, bootstrap, coffee script, jquery and etc) not to mention all these gems being used but hopefully I will get the hang of it soon. 

Sunday, December 30, 2012

Creating a Spree application


Spree is an open source e-commerce platform that is available as a ruby gem for Ruby on Rails framework. It is intended as a foundation over which developers can build their own e-commerce sites.

Prerequisites

To use Spree you will need to install following:
  1. ruby
  2. imagemagick
  3. nodejs
  4. libxml2
  5. libxml2-dev
  6. libssl-dev
  7. libxslt-dev
  8. postgresql
  9. postgresql-server-dev-9.1
If you are using Ubuntu, you can easily install all of these from repos using aptitude. Imagemagick is required for resizing uploaded images. PostgreSql is selected because it is common in the hosting platforms but if you are not concerned about it, you can simply replace it with sqlite or anything else that you like.

Steps

After installing the above listed softwares, install bundler, rails, rake and spree gem using following command:
gem install bundler rake rails spree
Now create a new rails application. The default database is Sqlite, so we need to specify that we want postgres:
rails new myspreeapp -d postgresql
Edit config/database.yml and add host: localhost to all configurations and also correct database name, username and password. Next, add spree to your app. To do this run following command from withing your applications root directory:
spree install
This will run a wizard which will ask your choices for running migrations, loading seed data and others and perform the required actions. When the wizard ends your spree application is ready and you can now run it on local host using:
rails s
Your basic spree applications is now available at http://0.0.0.0:3000. You will most probably want to customize this application according to your needs. Head over to spree customization guides for a detailed look at customizing spree.