Martyn
Martyn

Reputation: 6383

How to clone and run another user's Rails app

I'm attempting to do something I've never done before: clone another user's (codeforamerica) repository and run it locally on my computer with the intention of making my own changes to it.

I've managed to fork it to my own repositories, and cloned it:

git clone https://github.com/martynbiz/human_services_finder.git

...but when I do the following straight out the box:

cd human_services_finder
rails s

...it tell me:

The program 'rails' is currently not installed.  You can install it by typing:
sudo apt-get install rails

...however, if I go into one of my own apps and run rails s it runs the server OK. Is there something missing I need to run this as a Rails app? Sorry, bit of a beginner with this one. Thanks

Upvotes: 12

Views: 18262

Answers (2)

Pravin Mishra
Pravin Mishra

Reputation: 8434

Below are the setups to run Ruby on Rails application on your system.

  1. Make sure Ruby is installed on your system. Fire command prompt and run command:

    ruby -v
    
  2. Make sure Rails is installed

    rails -v
    

If you see Ruby and Rails version then you are good to start, other wise Setup Ruby On Rails on Ubuntu

Once done, Now

  1. Clone respected git repository

    git clone https://github.com/martynbiz/human_services_finder.git
    
  2. Install all dependencies

    bundle install
    
  3. Create db and migrate schema

    rake db:create
    rake db:migrate
    
  4. Now run your application

    rails s
    

Upvotes: 23

Severin
Severin

Reputation: 8588

You need to install all the dependencies (Gems). This should be possible by running

bundle install

from the applciations directory.

If you are not using RVM yet I would strongly recommend doing so.

Upvotes: 2

Related Questions