File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 99appraise "rails-4.0" do
1010 gem 'rails' , '~> 4.0'
1111end
12+
13+ appraise "rails-4.0-with-therubyracer" do
14+ gem 'rails' , '~> 4.0'
15+ gem 'therubyracer' , '0.12.0' , :platform => :mri
16+ end
Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ module React
66 module JSX
77 def self . context
88 # TODO: create React::Source::contents_for
9- contents = File . read ( React ::Source . bundled_path_for ( 'JSXTransformer.js' ) )
9+ contents =
10+ # If execjs uses therubyracer, there is no 'global'. Make sure
11+ # we have it so JSX script can work properly.
12+ 'var global = global || this;' +
13+ File . read ( React ::Source . bundled_path_for ( 'JSXTransformer.js' ) )
1014 @context ||= ExecJS . compile ( contents )
1115 end
1216
You can’t perform that action at this time.
0 commit comments