小编Bas*_*ien的帖子

Rails Rspec`require':无法加载这样的文件 - rails_helper(LoadError)

我正在尝试使用Rspec进行测试.我跑的时候

$ rspec mytest_spec.rb
Run Code Online (Sandbox Code Playgroud)

由于这个原因,我得到以下错误

/home/bastien/.merbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rails_helper (LoadError)
Run Code Online (Sandbox Code Playgroud)

如果我跑的话,我已经尝试了很多东西

rspec spec
Run Code Online (Sandbox Code Playgroud)

要么

bundle exec rspec
Run Code Online (Sandbox Code Playgroud)

从我的.rspec文件所在的文件夹中我没有​​收到任何错误.我创建了一个应用程序只是为了干这个问题测试(我创建了一个新的铁路应用程序,在我的Gemfile中添加了rspec,运行bundle install命令和rspec:install命令,生成了一个脚手架并运行测试.有人可以向我解释为什么我会遇到这个问题以及如何摆脱它?当我尝试只运行一个规格时,我做错了吗?谢谢.

ruby rspec ruby-on-rails

5
推荐指数
2
解决办法
4908
查看次数

在Heroku上部署Django应用程序时pip install requirements.txt问题

我正在尝试使用以下指南在Heroku上部署我的django应用程序:https://devcenter.heroku.com/articles/deploying-python.我达到了必须使用以下命令创建和填充"requirements.txt"文件的程度:

$ pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)

但是,我收到以下错误消息

You must give at least one requirement to install (see "pip help install")
Run Code Online (Sandbox Code Playgroud)

我尝试了另外两个命令

$ pip install -r requirements.txt requirements.txt
$ pip install --allow-all-external requirements.txt
Run Code Online (Sandbox Code Playgroud)

但在这两种情况下我都会收到以下错误

Collecting requirements.txt
/home/bastien/python/framework/scrapping/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can …
Run Code Online (Sandbox Code Playgroud)

python django pip heroku

3
推荐指数
1
解决办法
5203
查看次数

标签 统计

django ×1

heroku ×1

pip ×1

python ×1

rspec ×1

ruby ×1

ruby-on-rails ×1