ruby-on-rails - Running a forked repo
问题描述
I'm attempting to fork the repo and run it locally. Steps I took so far are:
- Download repo
- Change gemname gem version in
version.rb
to1.4.0
because version is not available - Uninstall and reinstall bundler to version
1.6.1
- Run
bundle install
- Get the error
Make sure that gem install gemname -v '1.4' succeeds before bundling.
- Run
gem install gemname -v '1.4'
and installed gem successfully - Run
bundle install
and I loop back to the error on step 5
I clearly have surveyor installed but yet bundler doesn't seem to recognize this. I'm a novice and very rusty on Rails.
Thanks in advance for your help!
解决方案
要依赖 Git repo 中的 gem 版本,请告诉 bundler 从 repo 获取 gem。
gem 'surveyor', '~> 1.4', git: 'https://github.com/scwong93/surveyor/'
然后bundle
正常运行。你应该看到...
使用来自https://github.com/scwong93/surveyor/的surveyor 1.4.1.q (在master@e253789)
查看您的内部Gemfile.lock
,通过从 repo 的 master 分支中拉出它确实找到了 repo 版本 1.4.1q。
GIT
remote: https://github.com/scwong93/surveyor/
revision: e25378983fd465db701610eb076179c74db98c11
specs:
surveyor (1.4.1.q)
formtastic (~> 2.2.1)
haml (>= 4.1.0.beta.1)
mustache (~> 0.99)
rabl (~> 0.6)
rails (>= 3.2)
sass
uuidtools (~> 2.1)
推荐阅读
- python - 当 matplotlib 从 csv 文件中绘制实时数据时,RAM 迅速增加
- java - 需要关于 Spring Boot API 的错误处理的建议或更好的设计 - 微服务
- design-patterns - 域驱动实现 - 更新聚合根中的单个属性
- solace - Solace Message Router 是否有反向代理?
- python - 跳得太快?
- python - 如何在 OpenPyXl 运行时通过变量名更改为特定工作表?
- python - Github API:获取 Python 中所有新版本的“正文”
- python - 当函数需要一个参数时,放 2 个括号是否允许我传递 2 个参数?
- android - 登录用户或管理员
- python - 数字中的数字因子