Skip to content

Instantly share code, notes, and snippets.

@Evanto
Last active April 30, 2017 10:01
Show Gist options
  • Save Evanto/ac60fa709f60cbaeabb614ffd8ab4153 to your computer and use it in GitHub Desktop.
Save Evanto/ac60fa709f60cbaeabb614ffd8ab4153 to your computer and use it in GitHub Desktop.
Подскажите пожалуйста, как правильно ораганизовать рабочую среду.
У меня есть простой проект https://github.com/Evanto/SleepCalc.
Я использую на Ubuntu 16.10 (GNU/Linux 4.8.0-49-generic x86_64) Vagrant c синхронизованной папкой для разработки. На сервере в irb косноли у меня виснет транзакция. Как я понимаю,
мне нужна обратная синхронизация (или управляемая) чтобы можно было работать с консолью внутри гостевой машины.
Вот лог проблемы. Ведущая система руби конфликтует с частью пакетов и не может быть исполнена.
```
rails c
Running via Spring preloader in process 8176
Loading development environment (Rails 5.0.2)
irb(main):001:0> Sleep.create hours: "1970-01-01 06:10:00"
DEPRECATION WARNING: Time columns will become time zone aware in Rails 5.1. This
still causes `String`s to be parsed as if they were in `Time.zone`,
and `Time`s to be converted to `Time.zone`.
To keep the old behavior, you must add the following to your initializer:
config.active_record.time_zone_aware_types = [:datetime]
To silence this deprecation warning, add the following:
config.active_record.time_zone_aware_types = [:datetime, :time]
(called from irb_binding at (irb):1)
DEPRECATION WARNING: Time columns will become time zone aware in Rails 5.1. This
still causes `String`s to be parsed as if they were in `Time.zone`,
and `Time`s to be converted to `Time.zone`.
To keep the old behavior, you must add the following to your initializer:
config.active_record.time_zone_aware_types = [:datetime]
To silence this deprecation warning, add the following:
config.active_record.time_zone_aware_types = [:datetime, :time]
(called from irb_binding at (irb):1)
(0.1ms) begin transaction
^C (0.1ms) rollback transaction
IRB::Abort: abort then interrupt!
from /var/lib/gems/2.4.0/gems/activemodel-5.0.2/lib/active_model/validator.rb:149:in `sleep'
from /var/lib/gems/2.4.0/gems/activemodel-5.0.2/lib/active_model/validator.rb:149:in `block in validate'
from /var/lib/gems/2.4.0/gems/activemodel-5.0.2/lib/active_model/validator.rb:148:in `each'
from /var/lib/gems/2.4.0/gems/activemodel-5.0.2/lib/active_model/validator.rb:148:in `validate'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:405:in `public_send'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:405:in `block in make_lambda'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:169:in `block (2 levels) in halting'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:547:in `block (2 levels) in default_terminator'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:546:in `catch'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:546:in `block in default_terminator'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:170:in `block in halting'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:454:in `block in call'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:454:in `each'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:454:in `call'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:750:in `_run_validate_callbacks'
... 24 levels...
from /var/lib/gems/2.4.0/gems/railties-5.0.2/lib/rails/commands/console_helper.rb:9:in `start'
from /var/lib/gems/2.4.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:78:in `console'
from /var/lib/gems/2.4.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /var/lib/gems/2.4.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `block in require'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
from /home/ubuntu/www/sleepcalc/bin/rails:9:in `<top (required)>'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `block in load'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
from /var/lib/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
irb(main):002:0>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment