我剛花了大約3個小時嘗試重新安裝nuked Rails安裝。它嘗試安裝「authlogic」gem後停止了工作(其中,順便說一句,如果任何人有任何想法如何安裝,請讓我知道)。Rails是Nuked - 如何重新安裝
新的錯誤
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。 核彈的Rails鍵入 「sudo的創業板安裝authlogic」 2.嘗試刪除後〜/ .rvm,仍然不起作用 3.使用寶石卸載,刪除所有寶石,直到沒有任何顯示在寶石列表 - 本地 4. sudo gem install 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。
老兄!只要離開並逃脫!您的項目已被刪除!您有暴露於過量放射性輻射的危險!逃逸! – Behrang 2012-02-27 03:35:28
現在開玩笑說,刪除你的'Gemfile.lock',並從項目的根目錄中運行'bundle install'。你爲什麼做'sudo gem'?使用rvm你只需要運行'gem install ...'。可能是authlogic安裝在系統範圍的gem目錄中,而不是您的主文件夾的gem目錄。 – Behrang 2012-02-27 03:37:49
這幾乎可以肯定你的預裝紅寶石與你安裝的rvm ruby的混合情況。 rvm的美妙之處在於你一般不會安裝任何東西。由於您刪除了.rvm文件,因此可能需要重新安裝rvm。 – 2012-02-27 03:41:27