Skip to content

Commit fd5c92a

Browse files
committed
Rspec tests fail due to tilt dependency
I am using `react-rails` as dependency in a gem I created and running `rspec` in that gem throws the following error: ``` $ rspec /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx/template.rb:1:in `require': cannot load such file -- tilt (LoadError) from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx/template.rb:1:in `<top (required)>' from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx.rb:3:in `require' from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react/jsx.rb:3:in `<top (required)>' from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react-rails.rb:1:in `require' from /Users/gbanis/.rvm/gems/ruby-2.0.0-p598/gems/react-rails-0.13.0.0/lib/react-rails.rb:1:in `<top (required)>' ... ``` This happens because `react-rails` requires `tilt` [here](https://github.com/reactjs/react-rails/blob/0.13/lib/react/jsx/template.rb). I've noticed that adding `tilt` as a dependency in the `gemspec` solves this issue and all other tests run without a problem.
1 parent 08dc160 commit fd5c92a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

react-rails.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
2121
s.add_dependency 'execjs'
2222
s.add_dependency 'rails', '>= 3.1'
2323
s.add_dependency 'react-source', '0.13.0'
24+
spec.add_dependency 'tilt'
2425

2526
s.files = Dir[
2627
'lib/**/*',

0 commit comments

Comments
 (0)