我正在尝试使用 JRuby 在 Windows 上设置 Guard,我得到了以下输出:
$ guard
You must 'gem install win32console' to use color on Windows
WARNING: You are using Guard outside of Bundler, this is dangerous and could not
work. Using `bundle exec guard` is safer.
Guard uses Notifu to send notifications.
Guard is now watching at 'C:/Workspace/OE_11/CyberTrack_Rails3'
Guard::RSpec is running, with RSpec 2!
Running all specs
bundler: command not found: rspec
Install missing gem executables with `bundle install`
>
如果我只是输入命令'rspec',一切都会奏效。那么我在这里错过了什么?
$ rspec
←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m←[32m.←[0m
Finished in 1.39 seconds
←[32m8 examples, 0 failures←[0m
我将 rspec.bat 的路径添加到我的 PATH 环境变量中。
顺便说一句,我在 Windows 上工作。在 Ubuntu 上,我很快就能让一切正常工作......
更新宝石文件:
source 'https://rubygems.org'
gem 'rails', '3.2.2.rc1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jruby-openssl'
gem 'json'
group :development do
gem 'rspec-rails'
gem 'guard-rspec'
end
group :test do
gem 'rspec-rails'
gem 'guard-rspec'
gem 'capybara', '1.1.2'
gem 'rb-fchange', '0.0.5'
gem 'rb-notifu', '0.0.4'
#gem 'win32console', '1.3.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyrhino'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'