RailsApps / rails3-devise-rspec-cucumber

An example Rails 3.2 app with Devise and RSpec and Cucumber.
http://railsapps.github.io/
444 stars 144 forks source link

Default javascript runtime #6

Closed duylam closed 13 years ago

duylam commented 13 years ago

Hi,

I'm trying this project and get error when running "rake db:migrate" (it said I had no javascript runtime). From this topic http://stackoverflow.com/questions/6282307/rails-3-1-execjs-and-could-not-find-a-javascript-runtime, I figured out that I didn't install any javascript runtime but it requires any runtime must be installed in Gemfile.

So I just add the default one in Gemfile

DanielKehoe commented 13 years ago

For the Rails 3.1 release candidate, a JavaScript runtime is needed for Linux Ubuntu. It is not needed for Mac OS X or Windows. It will not be needed for the final release of Rails 3.1. See http://railsapps.github.com/rails-3-1-example-gemfile.html for details.

Since the rubyracer runtime is only needed for Linux, I will not add it to the example app Gemfile.

Please let me know if you disagree.

-- Daniel

duylam commented 13 years ago

Thank Daniel

In my case, my ubuntu box didn't have javascript runtime gem by default so it's correct with your explanation. But if I install any javascript runtime gem by command line (gem install therubyracer) rather than adding new line in Gemfile (gem "therubyracer"), the execjs gem (installed automatically by bundle) doesn't see that new javascript runtime.

By adding a default runtime in Gemfile, I just want to make sure that people can run this sample Rails app right away without having to know whether their OS has default javascript runtime or not. Anyway, that's just my idea. You're right about rubyracer , Windows user may get trouble in compiling if they have to install it