Jasmine-Gem and Rails3Beta4 issues

52 views
Skip to first unread message

Mike Gehard

unread,
Jun 30, 2010, 4:52:42 PM6/30/10
to jasmi...@googlegroups.com, jasmine...@googlegroups.com
Greetings,

I am working to integrate the Jasmine Gem (version 0.11.1.0) from Rubygems via Bundler into a brand new Rails3 site using rvm and a brand new gemset.  I am using RSpec2 as the specing framework.

I have added the Gemfile entry (gem 'jasmine', '0.11.1.0') and Bundler did indeed install it and its dependencies. 

When I tried to run "rails generate jasmine", I get the following error "Could not find generator jasmine.".  I am guessing this is being caused by the fact that the generators framework has changed in Rails3.  I have entered a Tracker item (http://www.pivotaltracker.com/story/show/4110296) for this issue.

I then tried to use "jasmine init" to get the gem set up in my site and that seemed to work fine but when I try to run "rake jasmine" to start up the server, I get a "no such file to load -- json" error.  This is because the lib/jasmine/base.rb file is trying to "require 'json'" but when I run a "gem list" the json gem is no where to be found in the list but I do have the json_pure gem (version 1.4.3) installed.  Upon looking into the jasmine.gemspec file I didn't see any explicit dependency for the json gem.  

After adding the json gem to my Gemfile and running "bundle install", the server fires up fine.

It looks like Jasmine-gem is missing an explicit dependency on the json gem and something that it was relying on to install the json gem changed to the json_pure gem.  The Tracker story can be found here:

Looks like the workaround is to require the json gem in your Gemfile but a long term solution is to explicitly require the json (or the json_pure) gem in the jasmein.gemspec file.

--
Mike Gehard
Pivotal Labs Boulder
(970) 471-9835 | (303) 857-5980

Davis Frank

unread,
Jun 30, 2010, 11:26:23 PM6/30/10
to jasmi...@googlegroups.com, jasmine...@googlegroups.com
Whoops!  Thanks for the find.  We'll get that sorted for 1.0.

As a note, relying on the json_pure gem is probably bad as it's not necessarily cross-platform...

--dwf

--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.

Stephen Bannasch

unread,
Jul 14, 2010, 11:22:28 PM7/14/10
to jasmi...@googlegroups.com
>Whoops! Thanks for the find. We'll get that sorted for 1.0.
>
>As a note, relying on the json_pure gem is probably bad as it's not necessarily cross-platform...

I thought json_pure was slow but cross-platform.

The json gem itself doesn't work on jruby or Windows in 1.9 .. see:
http://github.com/flori/json/issuesearch?state=open&q=jruby#issue/35

Davis Frank

unread,
Jul 15, 2010, 8:51:34 AM7/15/10
to jasmi...@googlegroups.com
I mistyped.  Json_pure is slow, but cross-platform. 

We're looking into the right way to handle this specifically for Windows & JRuby.

--dwf

On Wed, Jul 14, 2010 at 8:22 PM, Stephen Bannasch <stephen....@deanbrook.org> wrote:
>Whoops!  Thanks for the find.  We'll get that sorted for 1.0.
>
>As a note, relying on the json_pure gem is probably bad as it's not necessarily cross-platform...

I thought json_pure was slow but cross-platform.

The json gem itself doesn't work on jruby or Windows in 1.9 .. see:
http://github.com/flori/json/issuesearch?state=open&q=jruby#issue/35
Reply all
Reply to author
Forward
0 new messages