Rails - rake: gems: set - do not set gems

If I define several stones in the config / environment / test.rb file as follows:

config.gem "rspec"
config.gem "rspec-rails"
config.gem "mocha"

and then run "rake gems: install RAILS_ENV = test"

I get the following error:

Missing these required gems:
  mocha  

Run `rake gems:install` to install the missing gems.

however, if I run the rake gke: install, as if he says that he will continue this procedure as always forever.

How do I get gems to install using rake (not gem install)?

thank!

+3
source share
4 answers

I wonder if there is a link to something of moxa stone in your rake file or environment.rb file? I have seen such problems before, and it presents a problem of this type.

mocha "" ...

gem install mocha

, rake gems:install.

+2

, . , lib/tasks/rspec.rake . ,

:lib => false

config.gem "rspec", :lib => false, :version => ">= 1.2.0"

.

+1

, GEM_PATH. , , , , . , .

dreamhost :

ENV['GEM_PATH'] = '/home/<my_account>/.gems:/usr/lib/ruby/gems/1.8/gems'

config/environment.rb

dev . YMMV, , , .

0

? ,

Run the command "Below" and its work

gem install mocha --platform = mswin32

0
source

Source: https://habr.com/ru/post/1737059/


All Articles