Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to run a project from github.

Here is the link. I used following command to download the project and it done successfully.

$ git clone git://github.com/cheeyeo/Amazon-SNS-Ruby.git

But I don't know how to run the project.Is it run from rails console? I'm using ruby on rails 3.2

share|improve this question

migrated from stackoverflow.com Apr 21 '13 at 17:24

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 3 down vote accepted

What to do with a Ruby git repo depends on what is in it, and usually described how to use it by the README.

In this case, the repo is for a gem, and it does not contain any Rails server examples or Rails projects.

Unless you have a specific need to use the github version, you should just use the version from rubygems.org

Ignore your cloned item for now, and add the gem to your own Rails project's Gemfile

gem "amaze_sns", "~> 1.3.0"

If you want to use this service as part of a Rails application, and don't yet have one, then you will need to create a new one. Other repos may contain example applications to get you started quickly - just not this one.

When you run bundle install or bundle update, Bundler will sort out a suitable copy of the gem for you.

The repo's examples here https://github.com/cheeyeo/Amazon-SNS-Ruby/tree/9cb8727ae104c39f44e795eef24b2012c3c7885a/example give some idea of how to use the gem in practice. You may be able to type that code into the Rails console, if you first do

gem install amaze_sns

to add the gem to your system Ruby (you probably don't need a full project started to do that testing)

share|improve this answer
    
but the project folder doesnt contain any gemfile –  Psl Apr 17 '13 at 11:08
    
@Psl: The repo doesn't contain a "project" or a rails service as such. You need to create one, and add this library to it (as a gem). –  Neil Slater Apr 17 '13 at 11:09
    
@Psl: I updated my answer to help point you at how you might use the gem from Rails console (and maybe without needing a Rails project started). Hope it helps. –  Neil Slater Apr 17 '13 at 11:15
    
yay for actually answering the question properly :) –  sevenseacat Apr 17 '13 at 11:30

The GitHub project will be cloned into your current working directory (the directory you were in when you executed the command).

Change directory into the cloned project directory and start the rails server with

Rails s
share|improve this answer

After you clone the project into your local system. You should enter into the project folder and have to give.

rails s to start the server it will start with 3000 port..

eg:-In console cd Amazon-SNS-Ruby

before start the server give

  bundle install

  rake db:create
  rake db:migrate

  rails s

go to browser give localhost:3000 to access the home page

if you like to run with some respective port give

rails s -p 3005
share|improve this answer
    
This answer would be most useful if the repo contained a Rails project. However, it contains a gem. Anyhow, I learned something from reading it (as I almost never run Rails, everything here is Sinatra). So thank you! –  Neil Slater Apr 17 '13 at 11:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.