pivotal/jasmine-gem — Issue #61: Jasmine 1.2.0.rc1 + Rails 3.1.1 throws on 'rails generate jasmine'
Author: jwhitley
Created: 2011-10-18 00:05:42+00:00
State: open

FWIW, I've given the Jasmine gem (1.2.0.rc1) a go with Rails 3.1.1, but it throws as follows.

```
>> bundle exec rails generate jasmine
[WARNING] Could not load generator "generators/jasmine/jasmine_generator" because it's a Rails 2.x generator, which is not supported anymore. Error: uninitialized constant Rails::Generator.
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/bundler/gems/jasmine-gem-5a7524ae9eae/lib/generators/jasmine/jasmine_generator.rb:1:in `'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/generators.rb:297:in `block (2 levels) in lookup'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/generators.rb:293:in `each'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/generators.rb:293:in `block in lookup'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/generators.rb:292:in `each'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/generators.rb:292:in `lookup'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/generators.rb:149:in `find_by_namespace'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/generators.rb:166:in `invoke'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/commands/generate.rb:12:in `'
/Users/whitley/.rvm/gems/ruby-1.9.2-p290@bam/gems/railties-3.1.1/lib/rails/commands.rb:28:in `'
script/rails:6:in `require'
script/rails:6:in `

'
Could not find generator jasmine.
```

This is with a newly generated Rails 3.1.1 app, using the following Gemfile:

```ruby
source 'http://rubygems.org'

# TEMP FIX for "warning: already initialized constant WFKV_" in rack 1.3.4
# http://stackoverflow.com/questions/7624661/rake-already-initialized-constant-warning
gem 'rack', '1.3.3'

gem 'rails', '3.1.1'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end

group :test do
# Using jasmine's git master because the gem hasn't been updated for
# Rails 3/RSpec 2 yet.
gem 'jasmine', '1.2.0.rc1', git: "https://github.com/pivotal/jasmine-gem.git", ref: '1.2.rc1'
end
```