git 如何克隆和运行另一个用户的 Rails 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22167838/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to clone and run another user's Rails app
提问by Martyn
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.
我正在尝试做一些我以前从未做过的事情:克隆另一个用户的(codeforamerica)存储库并在我的计算机上本地运行它,目的是对它进行自己的更改。
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
...但是,如果我进入我自己的应用程序之一并运行rails s
它,则服务器运行正常。我需要将它作为 Rails 应用程序运行时缺少什么吗?抱歉,这个有点初学者。谢谢
回答by Pravin Mishra
Below are the setups to run Ruby on Rails application on your system.
以下是在您的系统上运行 Ruby on Rails 应用程序的设置。
Make sure Ruby is installed on your system. Fire command prompt and run command:
ruby -v
Make sure Rails is installed
rails -v
确保您的系统上安装了 Ruby。触发命令提示符并运行命令:
ruby -v
确保安装了 Rails
rails -v
If you see Ruby and Rails version then you are good to start, other wise Setup Ruby On Rails on Ubuntu
如果您看到 Ruby 和 Rails 版本,那么您就可以开始了,否则在 Ubuntu 上设置 Ruby On Rails
Once done, Now
一旦完成,现在
Clone respected git repository
git clone https://github.com/martynbiz/human_services_finder.git
Install all dependencies
bundle install
Create db and migrate schema
rake db:create rake db:migrate
Now run your application
rails s
克隆受人尊敬的 git 存储库
git clone https://github.com/martynbiz/human_services_finder.git
安装所有依赖
bundle install
创建数据库并迁移架构
rake db:create rake db:migrate
现在运行你的应用程序
rails s