Rails Nuked - Как переустановить - PullRequest
0 голосов
/ 27 февраля 2012

Я потратил около 3 часов, пытаясь переустановить ядерную установку Rails.Он перестал работать после попытки установить "authlogic" гем (который, между прочим, если у кого-то есть идеи, как его установить, ПОЖАЛУЙСТА, дайте мне знать).

NEW ERROR

Justins-MacBook-Pro:cse480 Justin$ rails server
=> Booting WEBrick
=> Rails 3.2.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Library/Ruby/Gems/1.8/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load': /Volumes/Working/cse480/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)
...sion_store :cookie_store, key: '_cse480_session'
                              ^
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/engine.rb:588
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/engine.rb:587:in `each'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/engine.rb:587
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `run_initializers'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `send'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Volumes/Working/cse480/config/environment.rb:5
    from /Volumes/Working/cse480/config.ru:4:in `require'
    from /Volumes/Working/cse480/config.ru:4
    from /Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
    from /Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
    from /Volumes/Working/cse480/config.ru:1:in `new'
    from /Volumes/Working/cse480/config.ru:1

СТАРАЯ ПРОБЛЕМА

Шаги были примерно такими: 1. Nuke Rails после ввода "sudo gem install authlogic" 2. Попробуйте удалить ~ / .rvm, по-прежнему нетне работает 3. Используя gem uninstall, удалите ВСЕ драгоценные камни, пока ничего не отобразится в списке драгоценных камней --local 4. sudo gem install rails

Теперь "rails" работает, но только вне проекта Rails.Всякий раз, когда я захожу в приложение rails и запускаю сервер rails, я получаю следующее:

NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/shared_helpers.rb:3.
NOTE: Gem::SourceIndex.from_installed_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_installed_gems called from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:166.
NOTE: Gem::SourceIndex.installed_spec_directories is deprecated, use Specification.dirs. It will be removed on or after 2011-11-01.
Gem::SourceIndex.installed_spec_directories called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:47.
NOTE: Gem::SourceIndex.from_gems_in is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_gems_in called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:47.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:67.
NOTE: Gem::SourceIndex#spec_dirs= is deprecated, use Specification.dirs=. It will be removed on or after 2011-11-01.
Gem::SourceIndex#spec_dirs= called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:94.
NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#refresh! called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:95.
NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#load_gems_in called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:322.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:166.
Could not find rake-0.9.2.2 in any of the sources

Так что, очевидно, рейк пропал.Но только внутри проекта Rails (даже нового!).Оба rails и rake работают, но оба перестают работать, если я перехожу в каталог проекта Rails.

Я на Mac OS 10.7.3, и все работало идеально до использования sudo gem install authlogic.

1 Ответ

1 голос
/ 27 февраля 2012

Сложность здесь, скорее всего, упаковщик не понимает, все эти драгоценные камни исчезли. Попробуйте зайти в свой каталог Rails и выполнить «комплектную установку»; это должно привести к возвращению всех ваших драгоценных камней.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...