new to ruby need help

Hi,

I am extremely sorry for taking your quality time. But i am in a jam
now. This is what happened. I am a web developer with decent knowledge
of CSS, HTML, PHP, Unix, Shell, C++ and absolutely no knowledge of ruby.

I was working on a e-commerce module that i have to demonstrate
tomorrow. But i lost the whole code when my hard-disk crashed.
Now i am working on opencart to develop a module that i can show to save
my soul.
In meanwhile, i asked one of my friends if they had a spare code. he has
sent me an application but its in ruby. (i have no freaking idea how to
run it).

Therefore, i went on to net learnt a little bit of it, found out its
similar to shell in some ways.
Moreover, i downloaded Aptana studio 3, now i am going through his code,
but i am unable to launch it as an application.

Is there anyone who can give me some pointers on it.

Thanking you in advance.

If the database is created and setup, then just run ‘rails s’ under the project directory and open your browser to check http://localhost:3000.

If it is not, then you need to setup the database as below:

  1. rake db:create // create the database

  2. rake db:migrate // create the tables in the database

  3. rake db:seed // if there is any data need to setup

For the database setup, see the config/database.yml to fill the correct credential of you local database.

If there is any errors, please paste the log here and we can check it together.

Dear Yong Gu,

You guys are fast. I mean really fast i have been on unix forums
(unix.com) for a while, but replies this fast its amazing.
I have tried writing "rails s" it always says "sh.exe: rake: command not
found"

Do i need to use some other emacs as of now i am using Aptana Studio 3
on Windows 8 OS.

If you know of any better version tools or emacs or softwares for
running ruby easily on windows 8, do let me know i will download that
particular version.

Yong Gu wrote in post #1107444:

Hi,

Did you install ruby environment on your computer? I do not have any experience on running ruby on Window 8. I think you could try this: http://www.racap.net/2012/02/how-to-install-ruby-on-rails-in-windows.html.

Hi,

downloading the ruby installer "rubyinstaller-2.0.0-p0.exe" and
configuring it, if the screen comes as you stated in your previous reply
i will let you know.
Yong Gu wrote in post #1107446:

Hi,

i have installed the environment as per the tutorial you sent me.
"http://www.racap.net/2012/02/how-to-install-ruby-on-rails-in-windows.html"

As of now what i understand is this.

Step 1: install Ruby
Step 2: Install gems over it
Step 3: install rails over ruby.

I have already installed ruby and its working perfectly as i can see the
below messages

"Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

PS C:\Users\smelter> irb
DL is deprecated, please use Fiddle
irb(main):001:0>
"

Step 1: is successfull

Step 2: i am getting stuck.
I have already downloaded "http://rubygems.org/pages/download" the zip
package from here. unzipped it.

And i am unaware how to download it.

Hi,

run ‘gem install bundler’ to install Bundler http://gembundler.com/, then run ‘bundle install’ under the app directory to install the gems needed.

You keep talking about Ruby and others are assuming you want Ruby on
Rails. Which is it?

If you want RoR on Windows use railsinstaller. However better not to
use Windows in the first place, use Linux or Mac for RoR.

Colin

Hi Colin,

I want ruby on rails (ROR) and yes i am aware that will run wonderfully
on MAC/Linux.
But i don't have a mac machine as of now. I have window machine.
I am going to use railsinstaller now (railsinstaller-2.2.1 exe)

Thanks a tonne.i will get back with my query after downloading and
installing it.

Colin Law wrote in post #1107453:

I want ruby on rails (ROR) and yes i am aware that will run wonderfully

on MAC/Linux.

Will run wonderfully on OS X is a bit of a double edged sword since 2.0.

But i don’t have a mac machine as of now. I have window machine.

I am going to use railsinstaller now (railsinstaller-2.2.1 exe)

Linux runs just fine in VirtualBox or VMWare and with SublimeText + Sublime SFTP you could perform simple syncing into your Linux virtual machine. Unless you plan to run that application on Windows then you are better off testing on Linux because testing on Windows and deploying to Linux could result in two entirely different problems. That’s why good companies do staging but if you are just starting out that’s probably not on your list of things that matter.

Hi Colin,

I want ruby on rails (ROR) and yes i am aware that will run wonderfully
on MAC/Linux.
But i don't have a mac machine as of now. I have window machine.
I am going to use railsinstaller now (railsinstaller-2.2.1 exe)

The other thing you need to know is which version of Rails you want (I
think you are trying to run an existing app). In the root directory
of the application (the one containing the folders config, db and so
on ) you may find a file Gemfile. If so look in there and you should
find something like
gem 'rails', '3.0.4'
which is the version you need. If there is no Gemfile then look in
config/environment.rb and you should find something like
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
which again is the version you need.

Colin

Hi,

As per Colin's suggestion i have check the app i have, its version is
3.2.9 for rails.
I am using a windows 8 pc and i have tried all possible ways to install
ROR and i am being unsuccessful for a longtime.
It will be very kind of someone, if anyone can come on gmail chat and
explain me a little bit of where i am going wrong, I need to run this
app and i am not sure how to do so.

ashug.tech.1@gmail.com

Colin Law wrote in post #1107460:

Hi,

thanks a tonne i finally managed to install ROR perfectly, with all the
help from your side.
Can anyone of you guide me the best tutorial/ebook for a nooblet in ROR.

I would really like to learn ROR.

gautam s. wrote in post #1107465:

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book