Difference between revisions of "Talk:RubyFoo/Rails"

From Chaosdorf Wiki
Jump to navigation Jump to search
Line 31: Line 31:
 
  apt-get install libsqlite3-dev
 
  apt-get install libsqlite3-dev
  
== starting server ==
+
== JavaScript runtime error ==
/home/anonymous/.gem/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime.
+
 
See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
+
Does your application give the following error message at start?
 +
 
 +
  Could not find a JavaScript runtime.
 +
 
 +
You can fix this by installing a pure Ruby JavaScript interpreter, which is an easy way across all platforms. To do this, add the following line to the <tt>Gemfile</tt>.
 +
 
 +
  gem 'therubyracer'
 +
 
 +
...and let Bundler handle the rest
 +
 
 +
  $ bundle install

Revision as of 16:12, 24 October 2012

preperations

on "Debian GNU/Linux 6.0" its "ruby1.9.2"
after that, need to:

apt-get install rubygems
curious, the Debian packages page tells me that “This package provides Rubygems for Ruby 1.8. In Ruby 1.9.X, Rubygems is provided with the interpreter.” --Nomaster (talk) 09:58, 24 October 2012 (CEST)

rails new

An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.
gem install sqlite3 -v '1.3.6'
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
You need to install the SQlite development headers in package libsqlite3-dev. --Nomaster (talk) 10:00, 24 October 2012 (CEST)
apt-get install libsqlite3-dev

JavaScript runtime error

Does your application give the following error message at start?

 Could not find a JavaScript runtime.

You can fix this by installing a pure Ruby JavaScript interpreter, which is an easy way across all platforms. To do this, add the following line to the Gemfile.

 gem 'therubyracer'

...and let Bundler handle the rest

 $ bundle install