按照 Ruby on Rails 實戰聖經的指引,我在 ubuntu 10.04.4 下面进行了“編輯 Gemfile 這個檔案加上一行 gem 'therubyracer',輸入 bundle install 安裝這個套件”但启动服务器的时候还是遇到了 JS runtime 的错误,我查看提示:
demo$ bundle show therubyracer Could not find gem 'therubyracer' in the current bundle.
貌似 therubyracer 没有装上?是语法错了吗?我检查几次了
大家见笑了...
~/Desktop/projects/demo$ sudo bundle install
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.1.0)
Using activesupport (3.2.2)
Using builder (3.0.0)
Using activemodel (3.2.2)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.2)
Using actionpack (3.2.2)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.3)
Using actionmailer (3.2.2)
Using arel (3.0.2)
Using tzinfo (0.3.32)
Using activerecord (3.2.2)
Using activeresource (3.2.2)
Using coffee-script-source (1.2.0)
Using execjs (1.3.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.5)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.2)
Using coffee-rails (3.2.2)
Using jquery-rails (2.0.1)
Using bundler (1.1.0)
Using rails (3.2.2)
Using sass (3.1.15)
Using sass-rails (3.2.4)
Using sqlite3 (1.3.5)
Using uglifier (1.2.3)
Your bundle is complete! Use bundle show [gemname]
to see where a bundled gem is installed.
回楼上,therubyracer 貌似还是没有安装上去,难道改名了?
$ bundle install Using rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.1.0) Using activesupport (3.2.2) Using builder (3.0.0) Using activemodel (3.2.2) Using erubis (2.7.0) Using journey (1.0.3) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.1) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.2) Using actionpack (3.2.2) Using mime-types (1.17.2) Using polyglot (0.3.3) Using treetop (1.4.10) Using mail (2.4.3) Using actionmailer (3.2.2) Using arel (3.0.2) Using tzinfo (0.3.32) Using activerecord (3.2.2) Using activeresource (3.2.2) Using coffee-script-source (1.2.0) Using execjs (1.3.0) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Using json (1.6.5) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.2.2) Using coffee-rails (3.2.2) Using jquery-rails (2.0.1) Using bundler (1.1.0) Using rails (3.2.2) Using sass (3.1.15) Using sass-rails (3.2.4) Using sqlite3 (1.3.5) Using uglifier (1.2.3)