У меня есть проблема при запуске Rails из RubyMine, где она не сможет загрузить uglifier камень с ниже стека. Обратите внимание, что Node.js установлен на моем компьютере Windows 7.В RubyMine, Rails не удается загрузить «uglifier» драгоценный камень
От cmd.exe, «рельсы s» хорошо работает: начинается веб-приложение.
От RubyMine кнопка запуска, настройки по умолчанию, я получаю ошибку:
"C:\Program Files (x86)\JetBrains\RubyMine 8.0.2\bin\runnerw.exe" C:\tools\languages\RailsInstaller\Ruby2.2.0\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/projects/perso/exercises/bin/rails server -b 127.0.0.1 -p 3000 -e development
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from C:/projects/perso/exercises/config/application.rb:7:in `<top (required)>'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from C:/projects/perso/exercises/bin/rails:4:in `require'
from C:/projects/perso/exercises/bin/rails:4:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
я получаю ту же ошибку с RubyMine терминала.
Вот некоторая информация о моей среде из (тот же выход из cmd.exe и RubyMine):
>rails --version
Rails 4.2.6
>node --version
v0.10.22
>ruby --version
ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]
Рубин был установлен с помощью Rails Installer на Windows 7 компьютер , Node.js также установлен с использованием официального установщика. RubyMine 8.0.4 (конечная, не уверен, если есть версия сообщества тоже)
Я подозреваю проблему окружающей среды внутри RubyMine, в котором рельсы/Bundler/камень /? не может «видеть» Node.js, где cmd.exe может.
Я думаю, что ошибка началась, когда я попытался запустить RubyMine режим отладки.
Любая идея о том, как решить проблему?
Благодаря
Edit: некоторые больше информации
Мой Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.6'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'bcrypt', '~> 3.1.7'
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
грабли задачи (например, чтобы получить полный стек ошибок, обратите внимание на ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime.
)
>rake tasks --trace
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'.
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
C:/projects/perso/exercises/config/application.rb:7:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/projects/perso/exercises/Rakefile:4:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:689:in `raw_load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:94:in `block in load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:93:in `load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:77:in `block in run'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:75:in `run'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/bin/rake:33:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/bin/rake:23:in `load'
C:/tools/languages/RailsInstaller/Ruby2.2.0/bin/rake:23:in `<main>'
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:5:in `<module:ExecJS>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:4:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
C:/projects/perso/exercises/config/application.rb:7:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/projects/perso/exercises/Rakefile:4:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:689:in `raw_load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:94:in `block in load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:93:in `load_rakefile'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:77:in `block in run'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/lib/rake/application.rb:75:in `run'
C:/tools/languages/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rake-11.1.2/bin/rake:33:in `<top (required)>'
C:/tools/languages/RailsInstaller/Ruby2.2.0/bin/rake:23:in `load'
C:/tools/languages/RailsInstaller/Ruby2.2.0/bin/rake:23:in `<main>'
Спасибо за ваш ответ. Я добавил свой Gemfile в исходное сообщение. У меня уже есть gug-gugifier, и он установлен нормально, но он не загружает его, когда я лечу рельсы или рейк. – bouquetf