Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 330
Martyn Avatar asked Mar 04 '14 09:03

Martyn


People also ask

How do I run a cloned Ruby on Rails project?

How to run an existing Ruby-on-Rails project locally after cloning a repository. The first thing to do is to find the Ruby version used in the Rails project. Then, install the ruby version, bundler gem, dependencies (packages). Finally, set up the database and run the Rails project.


1 Answers

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
    
like image 121
Pravin Mishra Avatar answered Oct 13 '22 01:10

Pravin Mishra