简体   繁体   中英

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

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 

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM