Не запускается Rails server, как исправить?
Консоль выдает следующее:
C:\projects\sample>rails server => Booting WEBrick => Rails 4.1.4 application starting in development on http://0.0.0.0:3000 => Run `rails server -h` for more startup options => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0 .0.1 (—binding option) => Ctrl-C to shutdown server Exiting C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.2.1/lib/tzinfo/data_source.rb:1 82:in `rescue in create_default_data_source’: No source of timezone data could b e found. (TZInfo::DataSourceNotFound) Please refer to http://tzinfo.github.io/datasourcenotfound for help resolving th is error.
Просто добавьте в Gemfile
No source of timezone data could b e found
как починить — тут: http://tzinfo.github.io/datasourcenotfound
а вообще, как набегут, сразу скажут про винфак 😉
Не вышло.
C:\projects\sample>gem ‘tzinfo-data’, platforms: [:mingw, :mswin, :x64_mingw] ERROR: While executing gem . (Gem::CommandLineError) Unknown command tzinfo-data,
Re: Не вышло.
а бандлером не забыл установить tzinfo-data? пропиши bundle install и потом rails s
Ruby/Rails и Windows не совместимы, базовую конфигурацию может еще и заведешь, но дальше забудь.
я все снес и сейчас устанавливаю пакет с http://railsinstaller.org/ru-RU, может «пронесет»
Даже если решишь текущую проблему — всё равно скоро огребёшь новые, потому что под Windows кроме самого базового набора ничего нормально не заработает. Ковыряй рельсы под линуксом, хотя бы в виртуалке.
Думаю кому-то это тоже в дальнейшем поможет. Всем спасибо за помощь!
Я с никсами даже на Вы не знаком ;(
Может скинете в личку или еще как литературу как начинающему?
Источник
Ruby on Rails не запускается сервер. В чем проблема?
rails server
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on 0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/niks/SomeProject/firstApp/config/environments/development.rb:1:in `’: undefined method `configure’ for # (NoMethodError)
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in ‘
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in ‘
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:180:in `each’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component’
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!’
from /home/niks/SomeProject/firstApp/config/environment.rb:5:in `’
from /home/niks/SomeProject/firstApp/config.ru:3:in `require’
from /home/niks/SomeProject/firstApp/config.ru:3:in `block in ‘
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize’
from /home/niks/SomeProject/firstApp/config.ru:in `new’
from /home/niks/SomeProject/firstApp/config.ru:in `’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/server.rb:199:in `app’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in ‘
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap’
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands.rb:71:in `’
from bin/rails:4:in `require’
from bin/rails:4:in `’
/SomeProject/firstApp$ rails -v
Rails 4.0.2
group :development do
gem ‘sqlite3’, ‘1.3.8’
end
gem ‘sass-rails’, ‘4.0.1’
gem ‘uglifier’, ‘2.1.1’
gem ‘coffee-rails’, ‘4.0.1’
gem ‘jquery-rails’, ‘3.0.4’
gem ‘turbolinks’, ‘1.1.1’
gem ‘jbuilder’, ‘1.0.2’
group :doc do
gem ‘sdoc’, ‘0.3.20’, require: false
end
- Вопрос задан более трёх лет назад
- 2157 просмотров
> 4.0.2′
для использования последней 4.0.x версии RoR. В следующих версиях после 4.0.2 были исправлены различные ошибки и недочёты.
3. Запускать «bundle exec rails s»
Источник
Не запускается rails server, как исправить?
/railspr $ rails server
Usage:
rails new APP_PATH [options]
Options:
-r, [—ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/nikbyte/.rbenv/versions/2.3.0/bin/ruby
-m, [—template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
[—skip-gemfile], [—no-skip-gemfile] # Don’t create a Gemfile
-B, [—skip-bundle], [—no-skip-bundle] # Don’t run bundle install
-G, [—skip-git], [—no-skip-git] # Skip .gitignore file
[—skip-keeps], [—no-skip-keeps] # Skip source control .keep files
-O, [—skip-active-record], [—no-skip-active-record] # Skip Active Record files
-S, [—skip-sprockets], [—no-skip-sprockets] # Skip Sprockets files
[—skip-spring], [—no-skip-spring] # Don’t install Spring application preloader
-d, [—database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [—javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [—skip-javascript], [—no-skip-javascript] # Skip JavaScript files
[—dev], [—no-dev] # Setup the application with Gemfile pointing to your Rails checkout
[—edge], [—no-edge] # Setup the application with Gemfile pointing to Rails repository
[—skip-turbolinks], [—no-skip-turbolinks] # Skip turbolinks gem
-T, [—skip-test-unit], [—no-skip-test-unit] # Skip Test::Unit files
[—rc=RC] # Path to file containing extra configuration options for rails command
[—no-rc], [—no-no-rc] # Skip loading of extra configuration options from .railsrc file
Runtime options:
-f, [—force] # Overwrite files that already exist
-p, [—pretend], [—no-pretend] # Run but do not make any changes
-q, [—quiet], [—no-quiet] # Suppress status output
-s, [—skip], [—no-skip] # Skip files that already exist
Rails options:
-h, [—help], [—no-help] # Show this help message and quit
-v, [—version], [—no-version] # Show Rails version number and quit
Description:
The ‘rails new’ command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
‘rails new’ runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don’t affect the
defaults values shown above in this help message.
Example:
rails new
This generates a skeletal Rails installation in
/Code/Ruby/weblog.
See the README in the newly created application to get going.
Источник
Не запускается WEBrick (Rails Server). В чем дело?
/workspace/ruby/blog$ rails s
/home/matt/.rvm/gems/ruby-2.2.1/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 /home/matt/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler.rb:99:in `require’
from /home/matt/workspace/ruby/blog/config/application.rb:7:in `’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `require’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `block in server’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `’
from /home/matt/workspace/ruby/blog/bin/rails:9:in `require’
from /home/matt/workspace/ruby/blog/bin/rails:9:in `’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/spring-1.6.4/lib/spring/client.rb:28:in `run’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/spring-1.6.4/bin/spring:49:in `’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load’
from /home/matt/.rvm/gems/ruby-2.2.1/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `’
from /home/matt/workspace/ruby/blog/bin/spring:13:in `require’
from /home/matt/workspace/ruby/blog/bin/spring:13:in `’
from bin/rails:3:in `load’
from bin/rails:3:in `’
- Вопрос задан более трёх лет назад
- 431 просмотр
Ruby wrapper for UglifyJS JavaScript compressor.
Источник
Проблемы с запуском rails server. В чём загвоздка?
Начинаю осваивать Ruby on Rails и сталкиваюсь с кучей проблем гемов. После установки bundle перестал запускаться rails server. Далее сама ошибка:
C:\Users\JulyTab\Documents\Diplom\StudyWorld\StudyWorldPr>rails server
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:81:in `rescue in block (2 levels) in require’: There was an error while trying to load the gem ‘less-rails’. (Bundler::GemReq
uireError)
Gem Load Error is: uninitialized constant V8::JSError
Backtrace for gem load error is:
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:61:in `rescue in lock’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:60:in `lock’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:19:in `initialize’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:15:in `new’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less/java_script/v8_context.rb:15:in `instance’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less/loader.rb:13:in `initialize’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less.rb:14:in `new’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less.rb:14:in `’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-2.6.0/lib/less.rb:9:in `’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-rails-2.7.1/lib/less/rails.rb:6:in `require’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-rails-2.7.1/lib/less/rails.rb:6:in `’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-rails-2.7.1/lib/less-rails.rb:1:in `require’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/less-rails-2.7.1/lib/less-rails.rb:1:in `’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:78:in `require’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:78:in `block (2 levels) in require’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:73:in `each’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:73:in `block in require’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `each’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `require’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler.rb:102:in `require’
C:/Users/JulyTab/Documents/Diplom/StudyWorld/StudyWorldPr/config/application.rb:7:in `’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `require’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `block in server’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!’
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `’
bin/rails:4:in `require’
bin/rails:4:in `’
Bundler Error Backtrace:
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:77:in `block (2 levels) in require’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:73:in `each’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:73:in `block in require’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `each’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `require’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.pre.1/lib/bundler.rb:102:in `require’
from C:/Users/JulyTab/Documents/Diplom/StudyWorld/StudyWorldPr/config/application.rb:7:in `’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `require’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `block in server’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!’
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `’
from bin/rails:4:in `require’
from bin/rails:4:in `’
Помогите разобраться (упоминающиеся в ошибках гемы переустановила). Заранее спасибо!
Источник