anjlab / bootstrap-rails

Twitter Bootstrap CSS (with Sass flavour) and JS toolkits for Rails 3 projects
https://github.com/anjlab/bootstrap-rails
729 stars 96 forks source link

JavaScript compilation error #6

Closed rurounijones closed 12 years ago

rurounijones commented 12 years ago

With a brand new vanilla rails 3.1.3 application add bootstrap-rails as per the instructions in the readme. Create a users scaffold for testing. access the users url.

Page fails to load with the following error (Snipped the huge log).

js: "/tmp/execjs20111130-9635-x3m7up-0.js", line 508: missing ; before statement
js: });
js: .^
js: "/tmp/execjs20111130-9635-x3m7up-0.js", line 508: missing } after function body
js: });
js: ..^

  (in /home/jjones/Projects/bootstrapapp/app/assets/javascripts/users.js.coffee)):
    3: <head>
    4:   <title>Bootstrapapp</title>
    5:   <%= stylesheet_link_tag    "application" %>
    6:   <%= javascript_include_tag "application" %>
    7:   <%= csrf_meta_tags %>
    8: </head>
    9: <body>
  app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___164868779_70317176179640'
  app/controllers/users_controller.rb:7:in `index'

Now I got the exact same error with the bootstrap-sass gem by @thomas-mcdonald as well. I am wondering if something broke in the vendored javascript or something in extjs?

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.6
  - RUBY VERSION: 1.9.3 (2011-07-31 patchlevel -1) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/jjones/.rvm/gems/ruby-1.9.3-preview1@bootstraptest
  - RUBY EXECUTABLE: /home/jjones/.rvm/rubies/ruby-1.9.3-preview1/bin/ruby
  - EXECUTABLE DIRECTORY: /home/jjones/.rvm/gems/ruby-1.9.3-preview1@bootstraptest/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/jjones/.rvm/gems/ruby-1.9.3-preview1@bootstraptest
     - /home/jjones/.rvm/gems/ruby-1.9.3-preview1@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org/", "http://gems.github.com", "http://rubygems.torquebox.org", "http://gems.neurogami.com"]
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
     - http://gems.github.com
     - http://rubygems.torquebox.org
     - http://gems.neurogami.com
yury commented 12 years ago

@rurounijones, Can you gist your Gemfile and Gemfile.lock?

rurounijones commented 12 years ago

Newly created vanilla ruby app so hopefully nothing strange in there: https://gist.github.com/1408364

yury commented 12 years ago

@rurounijones, try to include gem 'therubyracer' in your Gemfile and run bundle install

On linux there is no default JS engine

rurounijones commented 12 years ago

Welp, I am an idiot. The vanilla app was indeed missing therubyracer.

I thought I also had this problem on another project (jruby with therubyrhino) but I have tried again from the beginning on both apps and it is working.

Sorry for the noise