2011-10-05 50 views
1

所以我想我的配置3.0.9轨道应用程式使用HTTPS和SSL通过添加以下行到我的环境配置搞砸了我的轨道依赖关系:

config.middleware.insert_before ActionDispatch::Static, "Rack::SSL" 

和定义机架:: SSL依赖在我的Gemfile

gem 'rack-ssl', :require => 'rack/ssl' 

出于某种原因,没有工作,所以我试图通过撤消上述第一回滚宝石依赖,然后

gem cleanup 

未如此工作,我做了以下愚蠢的事情:

gem uninstall rack-ssl 

gem uninstall railties 

其卸载都railties 3.0.9和3.1.0。

显然我没有前进的道路上一些不好的事情,但现在我不能运行轨道,我得到以下错误:

/Users/mgriffel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in to_specs': Could not find railties (= 3.0.9) amongst [ZenTest-4.6.2, abstract-1.0.0, actionmailer-3.1.0, actionmailer-3.0.9, actionpack-3.1.0, actionpack-3.0.9, activemodel-3.1.0, activemodel-3.0.9, activerecord-3.1.0, activerecord-3.0.9, activeresource-3.1.0, activeresource-3.0.9, activesupport-3.1.0, activesupport-3.0.9, addressable-2.2.6, annotate-2.4.0, arel-2.2.1, arel-2.0.10, autotest-4.4.6, autotest-fsevent-0.2.4, autotest-growl-0.2.9, autotest-rails-pure-4.1.2, bcrypt-ruby-3.0.1, builder-3.0.0, builder-2.1.2, bundler-1.0.18, diff-lcs-1.1.3, erubis-2.7.0, erubis-2.6.6, factory_girl-1.3.3, factory_girl_rails-1.0, gravatar_image_tag-1.0.0.pre2, heroku-2.8.0, hike-1.2.1, i18n-0.6.0, i18n-0.5.0, launchy-2.0.5, mail-2.3.0, mail-2.2.19, mime-types-1.16, multi_json-1.0.3, nokogiri-1.5.0, polyglot-0.3.2, rack-1.3.3, rack-1.2.4, rack-cache-1.0.3, rack-mount-0.8.3, rack-mount-0.6.14, rack-test-0.6.1, rack-test-0.5.7, rails-3.0.9, rake-0.9.2, rdoc-3.9.4, rest-client-1.6.7, rspec-2.6.0, rspec-core-2.6.4, rspec-expectations-2.6.0, rspec-mocks-2.6.0, rspec-rails-2.6.1, rubyzip-0.9.4, spork-0.9.0.rc8, sprockets-2.0.0, sqlite3-1.3.3, sys-uname-0.8.6, term-ansicolor-1.0.6, thor-0.14.6, tilt-1.3.3, treetop-1.4.10, tzinfo-0.3.30, tzinfo-0.3.29, webrat-0.7.1] (Gem::LoadError) from /Users/mgriffel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:759:in block in activate_dependencies' from /Users/mgriffel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:756:in each' from /Users/mgriffel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:756:in activate_dependencies' from /Users/mgriffel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:741:in activate' from /Users/mgriffel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1183:in gem' from /Users/mgriffel/.rvm/gems/[email protected]/bin/rails:18:in `'

谁能帮助我?我试着卸载并重新安装rails gem,但没有任何工作。

编辑:我意识到,切换到系统版本的红宝石(从我的RVM默认)解决了这一问题,所以我卸载,然后重新安装RVM,红宝石,Rails和我所有的宝石。这并没有完全解决这个问题,但我决定快速浏览一下我的Gemfile.lock,注意到rack-ssl仍然在那里。删除那个伎俩。

+1

恢复你尝试'束install'? – molf

+0

是的。当我回到以前的github版本时,我认为它与应用程序本身没有任何关系。 – mattangriffel

回答

1

你应该能够将其与gem install railties -v 3.0.9

+0

谢谢,在使用rails 4.0测试版后,这也帮助了我 – poseid