LINUX.ORG.RU

запуск локального сервера в rails

 ,


0

1

помогите пожалуйста решить проблему

через rvm установил rails на mint. проблема в том, что не получается запустить сервер webrick. вот вывод консоли:

sergey@sergey-H61M-D2-B3 ~/rails/project1 $ ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
sergey@sergey-H61M-D2-B3 ~/rails/project1 $ rails --version
Rails 3.2.21
sergey@sergey-H61M-D2-B3 ~/rails/project1 $ bundle update
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Enter your password to install the bundled RubyGems to your system: 
Using rake (10.4.2) 
Using i18n (0.7.0) 
Using multi_json (1.11.0) 
Using activesupport (3.2.21) 
Using builder (3.0.4) 
Using activemodel (3.2.21) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.3) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.3) 
Using actionpack (3.2.21) 
Using mime-types (1.25.1) 
Using polyglot (0.3.5) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.21) 
Using arel (3.0.3) 
Using tzinfo (0.3.44) 
Using activerecord (3.2.21) 
Using activeresource (3.2.21) 
Using bundler (1.3.5) 
Using coffee-script-source (1.9.1.1) 
Using execjs (2.5.2) 
Using coffee-script (2.4.1) 
Using rack-ssl (1.3.4) 
Using json (1.8.2) 
Using rdoc (3.12.2) 
Using thor (0.19.1) 
Using railties (3.2.21) 
Using coffee-rails (3.2.2) 
Using jquery-rails (3.1.2) 
Using rails (3.2.21) 
Using sass (3.4.13) 
Using sass-rails (3.2.6) 
Using sqlite3 (1.3.10) 
Using uglifier (2.7.1) 
Your bundle is updated!
sergey@sergey-H61M-D2-B3 ~/rails/project1 $ bundle install
Using rake (10.4.2) 
Using i18n (0.7.0) 
Using multi_json (1.11.0) 
Using activesupport (3.2.21) 
Using builder (3.0.4) 
Using activemodel (3.2.21) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.3) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.3) 
Using actionpack (3.2.21) 
Using mime-types (1.25.1) 
Using polyglot (0.3.5) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.21) 
Using arel (3.0.3) 
Using tzinfo (0.3.44) 
Using activerecord (3.2.21) 
Using activeresource (3.2.21) 
Using coffee-script-source (1.9.1.1) 
Using execjs (2.5.2) 
Using coffee-script (2.4.1) 
Using rack-ssl (1.3.4) 
Using json (1.8.2) 
Using rdoc (3.12.2) 
Using thor (0.19.1) 
Using railties (3.2.21) 
Using coffee-rails (3.2.2) 
Using jquery-rails (3.1.2) 
Using bundler (1.3.5) 
Using rails (3.2.21) 
Using sass (3.4.13) 
Using sass-rails (3.2.6) 
Using sqlite3 (1.3.10) 
Using uglifier (2.7.1) 
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
sergey@sergey-H61M-D2-B3 ~/rails/project1 $ rails server
/var/lib/gems/1.9.1/gems/execjs-2.5.2/lib/execjs/runtimes.rb:48:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
	from /var/lib/gems/1.9.1/gems/execjs-2.5.2/lib/execjs.rb:5:in `<module:ExecJS>'
	from /var/lib/gems/1.9.1/gems/execjs-2.5.2/lib/execjs.rb:4:in `<top (required)>'
	from /var/lib/gems/1.9.1/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `require'
	from /var/lib/gems/1.9.1/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `<top (required)>'
	from /var/lib/gems/1.9.1/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `require'
	from /var/lib/gems/1.9.1/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `<top (required)>'
	from /var/lib/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
	from /var/lib/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
	from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `require'
	from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `block (2 levels) in require'
	from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:70:in `each'
	from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:70:in `block in require'
	from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:59:in `each'
	from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:59:in `require'
	from /usr/lib/ruby/vendor_ruby/bundler.rb:132:in `require'
	from /home/sergey/rails/project1/config/application.rb:7:in `<top (required)>'
	from /var/lib/gems/1.9.1/gems/railties-3.2.21/lib/rails/commands.rb:53:in `require'
	from /var/lib/gems/1.9.1/gems/railties-3.2.21/lib/rails/commands.rb:53:in `block in <top (required)>'
	from /var/lib/gems/1.9.1/gems/railties-3.2.21/lib/rails/commands.rb:50:in `tap'
	from /var/lib/gems/1.9.1/gems/railties-3.2.21/lib/rails/commands.rb:50:in `<top (required)>'
	from script/rails:6:in `require'
	from script/rails:6:in `<main>'
sergey@sergey-H61M-D2-B3 ~/rails/project1 $ 

вот содержание Gemfile:

source 'https://rubygems.org'

gem 'rails' #, '3.2.16'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

#gem 'json' #, '1.8.2'

# gem 'therubyracer', :platforms => :ruby

раскоменти. запусти bundle еще раз.

kelyar ★★★★★ ()

Rails 3.2.21

это ты специально? или просто аптгетом ставил?

kelyar ★★★★★ ()
Ответ на: комментарий от prozaik

потренироваться на 3.2 можно, но троечка все-таки старая уже, лучше обновиться до 4.2

kelyar ★★★★★ ()
Ответ на: комментарий от Nucleus-

спасибо. это помогло

вроде нигде не написано, что нода обязательно нужна

prozaik ()
Ответ на: комментарий от prozaik

Не написано, да, но уже давно нужна. Не забудь только 4-ю версию поставить.

Удачной поездки :)

Nucleus- ()
Ответ на: комментарий от prozaik

uglify'еры всякие выруби и хрен с ним.

anonymous ()
Ответ на: комментарий от prozaik

вроде нигде не написано, что нода обязательно нужна

Я думаю, дело в том, что на маке действительно therubyracer или какой-либо другой js-рантайм доустанавливать не требуется, поэтому, видимо, он по дефолту и не включён.

static_lab ★★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.