LINUX.ORG.RU

Команда rails не работает

 , ,


0

1

Дело было так. Составил Gemfile, использовал bundle, потом пишу

bundle exec rails g bootstrap:install static

В ответ :

Traceback (most recent call last):
	3: from bin/rails:3:in `<main>'
	2: from bin/rails:3:in `require_relative'
	1: from /home/invoo/develop/todo/config/boot.rb:4:in `<top (required)>'
/home/invoo/develop/todo/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)

Потом понял, что rails вообще не работает :

Traceback (most recent call last):
	3: from bin/rails:3:in `<main>'
	2: from bin/rails:3:in `require_relative'
	1: from /home/invoo/develop/todo/config/boot.rb:4:in `<top (required)>'
/home/invoo/develop/todo/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)

Причём в гемфайле версия rails конкретно указана, скачана и bundler ошибок не выдавал

Пожалуйста, подскажите как это можно исправить


Ответ на: комментарий от oster2011

Теперь в gemfile добавил gem 'bootsnap'

При вводе rails generate bootstrap:install static

Выдаёт :

Traceback (most recent call last):
	26: from bin/rails:4:in `<main>'
	25: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
	24: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
	23: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
	22: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
	21: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
	20: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
	19: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
	18: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
	17: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<main>'
	16: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
	15: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:50:in `generate'
	14: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:128:in `generate_or_destroy'
	13: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
	12: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
	11: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
	10: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
	 9: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
	 8: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
	 7: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
	 6: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
	 5: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
	 4: from /home/invoo/develop/todo/config/application.rb:8:in `<main>'
	 3: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
	 2: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
	 1: from /home/invoo/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
/home/invoo/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- active_storage/engine (LoadError)
invice
() автор топика
Ответ на: комментарий от invice

Вот скажите : Почему в этом проекте возникает эта проблема, а в совершенно идентичном проекте ( просто я его делал вчера, в отдельной папке ) такой проблемы не возникает?

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