From e1d3ee1c7d221826e290c494d85d7f34a80ab062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Fri, 25 Jul 2014 13:36:22 -0700 Subject: [PATCH 01/20] v0.11.1.0, using React v0.11.1 I'm skipping React v0.11.0 since it included several bugs. We didn't ship react-rails right away, so it should be find to skip. --- lib/react/rails/version.rb | 2 +- react-rails.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/react/rails/version.rb b/lib/react/rails/version.rb index 968450111..b29940775 100644 --- a/lib/react/rails/version.rb +++ b/lib/react/rails/version.rb @@ -2,7 +2,7 @@ module React module Rails # Version numbers will track react-source, but we'll add another level so # that we can increment, but have some amount of stability. - VERSION = '0.10.0.0' + VERSION = '0.11.1.0' end end diff --git a/react-rails.gemspec b/react-rails.gemspec index c341ed92e..370fbdd91 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency 'execjs' s.add_dependency 'rails', '>= 3.1' - s.add_dependency 'react-source', '0.10.0' + s.add_dependency 'react-source', '0.11.1' s.files = Dir[ 'lib/**/*', From f89c7690873165aa4aa0f3eb4a26712af29ffe00 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 18 Aug 2014 10:45:12 -0400 Subject: [PATCH 02/20] Point to 0.11 in README on 0.11 branch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f8a128a4..eaff6a34d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ As with all gem dependencies, we strongly recommend adding `react-rails` to your ```ruby # Gemfile -gem 'react-rails', '~> 0.10.0.0' +gem 'react-rails', '~> 0.11.0.0' ``` From ad54110a98f6d4aee0abd38330d34cf5ab5f9258 Mon Sep 17 00:00:00 2001 From: William Meleyal Date: Tue, 9 Sep 2014 15:06:00 +0200 Subject: [PATCH 03/20] update readme with latest gem version, fixes #86 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eaff6a34d..8ab33d23a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ As with all gem dependencies, we strongly recommend adding `react-rails` to your ```ruby # Gemfile -gem 'react-rails', '~> 0.11.0.0' +gem 'react-rails', '~> 0.11.1.0' ``` From 25b9897fa6af705397f6e6a65a37581b80538130 Mon Sep 17 00:00:00 2001 From: Graham Ramsey Date: Tue, 28 Oct 2014 18:11:11 -0400 Subject: [PATCH 04/20] update to react-source 0.12 final (cherry picked from commit 2ebce5633b1a1e61481f6c84377e83bb2bb91100) Conflicts: react-rails.gemspec --- react-rails.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-rails.gemspec b/react-rails.gemspec index 370fbdd91..8e77e3ad0 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency 'execjs' s.add_dependency 'rails', '>= 3.1' - s.add_dependency 'react-source', '0.11.1' + s.add_dependency 'react-source', '0.12' s.files = Dir[ 'lib/**/*', From 90bb9806ae4b2f455ffaffd903c265e7d3ad8471 Mon Sep 17 00:00:00 2001 From: Graham Ramsey Date: Tue, 28 Oct 2014 18:47:19 -0400 Subject: [PATCH 05/20] update docs and test examples for changes in 0.12 (cherry picked from commit 4e81aff6250cd6a5bb71f65320accce331e01b80) Conflicts: README.md test/dummy/app/assets/javascripts/components/Todo.js.jsx.coffee test/dummy/app/assets/javascripts/components/TodoList.js.jsx test/dummy/app/assets/javascripts/example3.js.jsx test/helper_files/TodoListWithUpdates.js.jsx test/jsxtransform_test.rb test/react_renderer_test.rb --- README.md | 4 +--- test/dummy/app/assets/javascripts/example.js.jsx | 1 - .../assets/javascripts/example2.js.jsx.coffee | 2 -- test/jsxtransform_test.rb | 16 ++++------------ 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8ab33d23a..4e7ecc5d0 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Alternatively, you can include it directly as a separate script tag: ### JSX -To transform your JSX into JS, simply create `.js.jsx` files, and ensure that the file has the `/** @jsx React.DOM */` docblock. These files will be transformed on request, or precompiled as part of the `assets:precompile` task. +To transform your JSX into JS, simply create `.js.jsx` files. These files will be transformed on request, or precompiled as part of the `assets:precompile` task. ## Configuring @@ -83,8 +83,6 @@ end It is possible to use JSX with CoffeeScript. The caveat is that you will still need to include the docblock. Since CoffeeScript doesn't allow `/* */` style comments, we need to do something a little different. We also need to embed JSX inside backticks so CoffeeScript ignores the syntax it doesn't understand. Here's an example: ```coffee -###* @jsx React.DOM ### - Component = React.createClass render: -> `` diff --git a/test/dummy/app/assets/javascripts/example.js.jsx b/test/dummy/app/assets/javascripts/example.js.jsx index 2611211ae..5becf72d5 100644 --- a/test/dummy/app/assets/javascripts/example.js.jsx +++ b/test/dummy/app/assets/javascripts/example.js.jsx @@ -1,2 +1 @@ -/** @jsx React.DOM */
; diff --git a/test/dummy/app/assets/javascripts/example2.js.jsx.coffee b/test/dummy/app/assets/javascripts/example2.js.jsx.coffee index 6bb2e5528..1bdfe5594 100644 --- a/test/dummy/app/assets/javascripts/example2.js.jsx.coffee +++ b/test/dummy/app/assets/javascripts/example2.js.jsx.coffee @@ -1,5 +1,3 @@ -###* @jsx React.DOM ### - Component = React.createClass render: -> `` diff --git a/test/jsxtransform_test.rb b/test/jsxtransform_test.rb index c1479fa95..33f7d75d1 100644 --- a/test/jsxtransform_test.rb +++ b/test/jsxtransform_test.rb @@ -2,21 +2,16 @@ # The transformer is inserting a newline after the docblock for some reason... EXPECTED_JS = < Date: Tue, 28 Oct 2014 22:20:32 -0400 Subject: [PATCH 06/20] fix deprecated calls and provide expected messages for 0.12 (cherry picked from commit 359cfbb7479ef1e5627561297e0dfaa991a8c679) Conflicts: gemfiles/rails_4.1.gemfile lib/assets/javascripts/react_ujs.js lib/react/renderer.rb test/react_renderer_test.rb --- gemfiles/rails_3.1.gemfile | 2 +- gemfiles/rails_3.2.gemfile | 2 +- gemfiles/rails_4.0.gemfile | 2 +- gemfiles/rails_4.0_with_therubyracer.gemfile | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gemfiles/rails_3.1.gemfile b/gemfiles/rails_3.1.gemfile index 58db7a878..fac5a109b 100644 --- a/gemfiles/rails_3.1.gemfile +++ b/gemfiles/rails_3.1.gemfile @@ -4,4 +4,4 @@ source "http://rubygems.org/" gem "rails", "~> 3.1" -gemspec :path=>"../" \ No newline at end of file +gemspec :path => "../" diff --git a/gemfiles/rails_3.2.gemfile b/gemfiles/rails_3.2.gemfile index 779ce7c6e..0b2047cf5 100644 --- a/gemfiles/rails_3.2.gemfile +++ b/gemfiles/rails_3.2.gemfile @@ -4,4 +4,4 @@ source "http://rubygems.org/" gem "rails", "~> 3.2" -gemspec :path=>"../" \ No newline at end of file +gemspec :path => "../" diff --git a/gemfiles/rails_4.0.gemfile b/gemfiles/rails_4.0.gemfile index d54014891..a3fdee2c0 100644 --- a/gemfiles/rails_4.0.gemfile +++ b/gemfiles/rails_4.0.gemfile @@ -4,4 +4,4 @@ source "http://rubygems.org/" gem "rails", "~> 4.0" -gemspec :path=>"../" \ No newline at end of file +gemspec :path => "../" diff --git a/gemfiles/rails_4.0_with_therubyracer.gemfile b/gemfiles/rails_4.0_with_therubyracer.gemfile index ce64ea2ce..a8f5be006 100644 --- a/gemfiles/rails_4.0_with_therubyracer.gemfile +++ b/gemfiles/rails_4.0_with_therubyracer.gemfile @@ -3,6 +3,6 @@ source "http://rubygems.org/" gem "rails", "~> 4.0" -gem "therubyracer", "0.12.0", :platform=>:mri +gem "therubyracer", "0.12.0", :platform => :mri -gemspec :path=>"../" \ No newline at end of file +gemspec :path => "../" From 3ecc42b7451f350d6c182846e7f95dc0e5c9fe3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Thu, 6 Nov 2014 15:25:08 -0800 Subject: [PATCH 07/20] Update README for 0.12 branch --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4e7ecc5d0..97d46d33c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ As with all gem dependencies, we strongly recommend adding `react-rails` to your ```ruby # Gemfile -gem 'react-rails', '~> 0.11.1.0' +gem 'react-rails', '~> 0.12.0.0' ``` @@ -80,7 +80,7 @@ end ## CoffeeScript -It is possible to use JSX with CoffeeScript. The caveat is that you will still need to include the docblock. Since CoffeeScript doesn't allow `/* */` style comments, we need to do something a little different. We also need to embed JSX inside backticks so CoffeeScript ignores the syntax it doesn't understand. Here's an example: +It is possible to use JSX with CoffeeScript. We need to embed JSX inside backticks so CoffeeScript ignores the syntax it doesn't understand. Here's an example: ```coffee Component = React.createClass From a50fc7072d91f1640b5b15c3562ea171badd0591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Thu, 6 Nov 2014 15:25:47 -0800 Subject: [PATCH 08/20] Bump version for 0.12.0.0 --- lib/react/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/react/rails/version.rb b/lib/react/rails/version.rb index b29940775..54eac9dc8 100644 --- a/lib/react/rails/version.rb +++ b/lib/react/rails/version.rb @@ -2,7 +2,7 @@ module React module Rails # Version numbers will track react-source, but we'll add another level so # that we can increment, but have some amount of stability. - VERSION = '0.11.1.0' + VERSION = '0.12.0.0' end end From 96b98ebde101056a994f547c4b806eb7c350df69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Mon, 8 Dec 2014 14:34:50 -0800 Subject: [PATCH 09/20] Use react-source@0.12.1 --- react-rails.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-rails.gemspec b/react-rails.gemspec index 8e77e3ad0..a8b26bb05 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency 'execjs' s.add_dependency 'rails', '>= 3.1' - s.add_dependency 'react-source', '0.12' + s.add_dependency 'react-source', '0.12.1' s.files = Dir[ 'lib/**/*', From a3b4ddc9aed285e1236aa78a4b01e9da51f24234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Mon, 8 Dec 2014 14:35:03 -0800 Subject: [PATCH 10/20] v0.12.1.0 --- lib/react/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/react/rails/version.rb b/lib/react/rails/version.rb index 54eac9dc8..7a01a3b49 100644 --- a/lib/react/rails/version.rb +++ b/lib/react/rails/version.rb @@ -2,7 +2,7 @@ module React module Rails # Version numbers will track react-source, but we'll add another level so # that we can increment, but have some amount of stability. - VERSION = '0.12.0.0' + VERSION = '0.12.1.0' end end From e9ac34c44d2f88a236082f28f4e4c82a1dcfa494 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 2 Jan 2015 14:02:34 -0500 Subject: [PATCH 11/20] upgrade react-source to 0.12.2 --- react-rails.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-rails.gemspec b/react-rails.gemspec index a8b26bb05..43a1b95cb 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency 'execjs' s.add_dependency 'rails', '>= 3.1' - s.add_dependency 'react-source', '0.12.1' + s.add_dependency 'react-source', '0.12.2' s.files = Dir[ 'lib/**/*', From a80d91782a9c88838bb55a82e7cfc77ab8586fae Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 2 Jan 2015 14:04:13 -0500 Subject: [PATCH 12/20] expect double-quoted displayName in transformed JSX after facebook/react@eddbb0c --- test/jsxtransform_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jsxtransform_test.rb b/test/jsxtransform_test.rb index 33f7d75d1..8702f7c10 100644 --- a/test/jsxtransform_test.rb +++ b/test/jsxtransform_test.rb @@ -9,7 +9,7 @@ (function() { var Component; - Component = React.createClass({displayName: 'Component', + Component = React.createClass({displayName: "Component", render: function() { return React.createElement(ExampleComponent, {videos:this.props.videos} ); } From 4adbe403340f5944474d995a04cc8376c50cfb61 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Mon, 5 Jan 2015 18:37:21 -0500 Subject: [PATCH 13/20] use full path in integration tests looks like this is required after updating to actionpack 4.2.0 See change made in this commit: https://github.com/rails/rails/commit/4fd144dd4bb0e1ede5a4857c178138088353a3d1?diff=unified#diff-82ecef623242ece0e7d717577485d988L303 --- test/jsxtransform_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/jsxtransform_test.rb b/test/jsxtransform_test.rb index 8702f7c10..16b48a352 100644 --- a/test/jsxtransform_test.rb +++ b/test/jsxtransform_test.rb @@ -21,13 +21,13 @@ class JSXTransformTest < ActionDispatch::IntegrationTest test 'asset pipeline should transform JSX' do - get 'assets/example.js' + get '/assets/example.js' assert_response :success assert_equal EXPECTED_JS, @response.body end test 'asset pipeline should transform JSX + Coffeescript' do - get 'assets/example2.js' + get '/assets/example2.js' assert_response :success # Different coffee-script may generate slightly different outputs, # as some version inserts an extra "\n" at the beginning. From f5a0981897349c151ff321d7926b4b620bb4802e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Mon, 5 Jan 2015 16:07:02 -0800 Subject: [PATCH 14/20] v0.12.2.0 --- lib/react/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/react/rails/version.rb b/lib/react/rails/version.rb index 7a01a3b49..ef8be86c9 100644 --- a/lib/react/rails/version.rb +++ b/lib/react/rails/version.rb @@ -2,7 +2,7 @@ module React module Rails # Version numbers will track react-source, but we'll add another level so # that we can increment, but have some amount of stability. - VERSION = '0.12.1.0' + VERSION = '0.12.2.0' end end From 4da2126f948a934b2c56da9d9b1ce653491e41a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Tue, 10 Mar 2015 15:34:56 -0700 Subject: [PATCH 15/20] v0.13.0.0 --- lib/react/rails/version.rb | 2 +- react-rails.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/react/rails/version.rb b/lib/react/rails/version.rb index ef8be86c9..465028929 100644 --- a/lib/react/rails/version.rb +++ b/lib/react/rails/version.rb @@ -2,7 +2,7 @@ module React module Rails # Version numbers will track react-source, but we'll add another level so # that we can increment, but have some amount of stability. - VERSION = '0.12.2.0' + VERSION = '0.13.0.0' end end diff --git a/react-rails.gemspec b/react-rails.gemspec index 43a1b95cb..6c86d84ab 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency 'execjs' s.add_dependency 'rails', '>= 3.1' - s.add_dependency 'react-source', '0.12.2' + s.add_dependency 'react-source', '0.13.0' s.files = Dir[ 'lib/**/*', From 0dc0cf034dec22e0dd37583e5b808286b79d41ac Mon Sep 17 00:00:00 2001 From: zhangsoledad <787953403@qq.com> Date: Wed, 11 Mar 2015 18:08:36 +0800 Subject: [PATCH 16/20] add jsx_transform_options --- README.md | 8 +++++++- lib/react/jsx.rb | 9 +++++++-- lib/react/jsx/template.rb | 2 +- lib/react/rails/railtie.rb | 3 ++- test/dummy/config/application.rb | 4 ++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 97d46d33c..0d40bd828 100644 --- a/README.md +++ b/README.md @@ -87,4 +87,10 @@ Component = React.createClass render: -> `` ``` - +You can use the `--harmony` or `--strip-types` options by adding a configuration to `application.rb`: +```ruby +config.react.jsx_transform_options = { + harmony: true, + strip_types: true, # for removing Flow type annotations +} +``` diff --git a/lib/react/jsx.rb b/lib/react/jsx.rb index c9cfa24c1..17e101f94 100644 --- a/lib/react/jsx.rb +++ b/lib/react/jsx.rb @@ -4,6 +4,7 @@ module React module JSX + mattr_accessor :transform_options def self.context # TODO: create React::Source::contents_for contents = @@ -14,8 +15,12 @@ def self.context @context ||= ExecJS.compile(contents) end - def self.transform(code) - result = context.call('JSXTransformer.transform', code) + def self.transform(code, options={}) + js_options = { + stripTypes: options[:strip_types], + harmony: options[:harmony], + } + result = context.call('JSXTransformer.transform', code, js_options) return result['code'] end end diff --git a/lib/react/jsx/template.rb b/lib/react/jsx/template.rb index 3118b5fb8..244bb04cf 100644 --- a/lib/react/jsx/template.rb +++ b/lib/react/jsx/template.rb @@ -10,7 +10,7 @@ def prepare end def evaluate(scopre, locals, &block) - @output ||= JSX::transform(data) + @output ||= JSX::transform(data, JSX.transform_options) end end end diff --git a/lib/react/rails/railtie.rb b/lib/react/rails/railtie.rb index d1e753ead..7238101d1 100644 --- a/lib/react/rails/railtie.rb +++ b/lib/react/rails/railtie.rb @@ -15,10 +15,11 @@ class Railtie < ::Rails::Railtie if variant = app.config.react.variant || ::Rails.env.test? variant ||= :development addons = app.config.react.addons || false - + React::JSX.transform_options = app.config.react.jsx_transform_options # Copy over the variant into a path that sprockets will pick up. # We'll always copy to 'react.js' so that no includes need to change. # We'll also always copy of JSXTransformer.js + puts app.config.react.jsx_transform_options tmp_path = app.root.join('tmp/react-rails') filename = 'react' + (addons ? '-with-addons' : '') + (variant == :production ? '.min.js' : '.js') FileUtils.mkdir_p(tmp_path) diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb index e619601c7..a9d08600c 100644 --- a/test/dummy/config/application.rb +++ b/test/dummy/config/application.rb @@ -26,5 +26,9 @@ class Application < Rails::Application config.react.variant = :production config.assets.enabled = true + config.react.jsx_transform_options = { + harmony: true, + strip_types: true, # for removing Flow type annotations + } end end From 844ed95b96a92007bb3ef57539064e7eaacdeffb Mon Sep 17 00:00:00 2001 From: Jeffrey Fiddler Date: Wed, 11 Mar 2015 11:47:02 -0700 Subject: [PATCH 17/20] update gemfile to 0.13.0.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97d46d33c..462d964aa 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ As with all gem dependencies, we strongly recommend adding `react-rails` to your ```ruby # Gemfile -gem 'react-rails', '~> 0.12.0.0' +gem 'react-rails', '~> 0.13.0.0' ``` From f104ef20e536f2ec3fcc84d7c766b306189bc37e Mon Sep 17 00:00:00 2001 From: zhangsoledad <787953403@qq.com> Date: Thu, 12 Mar 2015 11:39:25 +0800 Subject: [PATCH 18/20] Update railtie.rb --- lib/react/rails/railtie.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/react/rails/railtie.rb b/lib/react/rails/railtie.rb index 7238101d1..1681673c6 100644 --- a/lib/react/rails/railtie.rb +++ b/lib/react/rails/railtie.rb @@ -19,7 +19,6 @@ class Railtie < ::Rails::Railtie # Copy over the variant into a path that sprockets will pick up. # We'll always copy to 'react.js' so that no includes need to change. # We'll also always copy of JSXTransformer.js - puts app.config.react.jsx_transform_options tmp_path = app.root.join('tmp/react-rails') filename = 'react' + (addons ? '-with-addons' : '') + (variant == :production ? '.min.js' : '.js') FileUtils.mkdir_p(tmp_path) From fd5c92a9a55df6722844dcece92fa33315cdec66 Mon Sep 17 00:00:00 2001 From: George Banis Date: Tue, 14 Apr 2015 16:36:18 -0400 Subject: [PATCH 19/20] 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 `' 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 `' 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 `' ... ``` 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. --- react-rails.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/react-rails.gemspec b/react-rails.gemspec index 6c86d84ab..64c98f747 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -21,6 +21,7 @@ Gem::Specification.new do |s| s.add_dependency 'execjs' s.add_dependency 'rails', '>= 3.1' s.add_dependency 'react-source', '0.13.0' + spec.add_dependency 'tilt' s.files = Dir[ 'lib/**/*', From bfa67f1d1b5a39a2ce8ac7b5e7d4b9b4a0ecd481 Mon Sep 17 00:00:00 2001 From: George Banis Date: Thu, 16 Apr 2015 17:43:51 -0400 Subject: [PATCH 20/20] Change spec to s --- react-rails.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-rails.gemspec b/react-rails.gemspec index 64c98f747..64d84c619 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_dependency 'execjs' s.add_dependency 'rails', '>= 3.1' s.add_dependency 'react-source', '0.13.0' - spec.add_dependency 'tilt' + s.add_dependency 'tilt' s.files = Dir[ 'lib/**/*',