vendredi 25 avril 2014

ExecJs errors while running Sinatra app on Thin web server


Vote count:

0




I'm getting new errors when I run sinatra apps on a thin web server on my computer -- they never happened before.


For example:



== Sinatra/1.4.5 has taken the stage on 4567 for development with backup from Thin
Thin web server (v1.6.2 codename Doc Brown)
Maximum connections set to 1024
Listening on localhost:4567, CTRL+C to stop
SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
This poses a security threat. It is strongly recommended that you
provide a secret to prevent exploits that may be possible from crafted
cookies. This will not be supported in future versions of Rack, and
future versions will even invalidate your existing user cookies.



Called from: /home/jesse/.rvm/gems/ruby-2.0.0-p451@sinatra/gems/rack-1.5.2/lib/rack/builder.rb:86:in `new'.
127.0.0.1 - - [25/Apr/2014 22:43:28] "GET / HTTP/1.1" 200 1092 0.0362
127.0.0.1 - - [25/Apr/2014 22:43:28] "GET /styles.css HTTP/1.1" 200 1040 0.0240
ExecJS::RuntimeError - [stdin]:7:1: error: unexpected indentation
$.post($('#like form').attr('action')(data) -> $('#like p').html(data).effect('highlight', color: '#fcd'))
^^^:
/home/jesse/.rvm/gems/ruby-2.0.0-p451@sinatra/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:47:in `rescue in block in call'
/home/jesse/.rvm/gems/ruby-2.0.0-p451@sinatra/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:43:in `block in call'
/home/jesse/.rvm/gems/ruby-2.0.0-p451@sinatra/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:80:in `block in lock'
/home/jesse/.rvm/gems/ruby-2.0.0-p451@sinatra/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:78:in `call'


The only thing I did recently was install ruby 1.9.3 with rvm, but this should have no effect on the ruby 2.0.0, with special sinatra gemset, that I am using while running the sinatra app.


Here's a list of the gems within my sinatra gemset:



activemodel (4.1.0)
activerecord (4.1.0)
activesupport (4.1.0)
addressable (2.3.6, 2.3.5)
arel (5.0.1.20140414130214)
backports (3.6.0)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
bigdecimal (1.2.0)
builder (3.2.2)
bundler (1.5.3)
bundler-unload (1.0.2)
capybara (1.1.2)
childprocess (0.5.2)
coffee-script (2.2.0)
coffee-script-source (1.7.0)
daemons (1.1.9)
data_mapper (1.2.0)
data_objects (0.10.14)
diff-lcs (1.1.3)
dm-aggregates (1.2.0)
dm-constraints (1.2.0)
dm-core (1.2.1)
dm-do-adapter (1.2.0)
dm-migrations (1.2.0)
dm-postgres-adapter (1.2.0)
dm-serializer (1.2.2)
dm-sqlite-adapter (1.2.0)
dm-timestamps (1.2.0)
dm-transactions (1.2.0)
dm-types (1.2.2)
dm-validations (1.2.0)
do_postgres (0.10.14)
do_sqlite3 (0.10.14)
eventmachine (1.0.3)
execjs (2.0.2)
executable-hooks (1.3.1)
fastercsv (1.5.5)
ffi (1.9.3)
gem-wrappers (1.2.4)
i18n (0.6.9)
io-console (0.4.2)
json (1.8.1, 1.7.7)
json_pure (1.8.1)
libv8 (3.16.14.3 x86_64-linux)
mail (2.5.4)
mime-types (2.2, 1.25.1)
mini_portile (0.5.3)
minitest (5.3.3, 4.3.2)
multi_json (1.9.2)
nokogiri (1.6.1)
pg (0.17.1, 0.13.2)
polyglot (0.3.4)
pony (1.8)
psych (2.0.0)
rack (1.5.2)
rack-protection (1.5.3, 1.5.2)
rack-test (0.6.2)
rake (0.9.6)
rdoc (4.0.0)
ref (1.0.5)
rspec (2.10.0)
rspec-core (2.10.1)
rspec-expectations (2.10.0)
rspec-mocks (2.10.1)
rubygems-bundler (1.4.2)
rubyzip (1.1.3)
rvm (1.11.3.9)
sass (3.3.3)
selenium-webdriver (2.41.0)
shotgun (0.9)
sinatra (1.4.5, 1.4.4, 1.3.2)
sinatra-activerecord (1.7.0)
sinatra-contrib (1.4.2)
sinatra-flash (0.3.0)
slim (2.0.2)
sqlite3 (1.3.9)
stringex (1.5.1)
temple (0.6.7)
test-unit (2.0.0.0)
therubyracer (0.12.1)
thin (1.6.2)
thread_safe (0.3.3)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.1.0)
uuidtools (2.1.4)
websocket (1.0.7)
xpath (0.1.4)


The 'therubyracer' gem should have taken care of teh ExecJs issues, but I tried installing the execjs gem on top of that, just in case -- that did not solve the problem.


I don't know what else to try.



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire