2014-04-29 16 views
0

我已经作出了一系列简单的应用程序,我已经在我的Gemfile被安装相同的宝石每个应用在过去几个星期出于某种原因,这次我遇到了一些麻烦。安装了最新的轨宝石的Gemfile将恢复的ActionMailer回版本0.6.1

当我bundle我的Gemfile,然后尝试启动Rails服务器或导轨控制台我得到以下错误:

Aarons-iMac:ripelist AaronWilliamson$ rails s 
/Users/AaronWilliamson/Desktop/ripelist/config/application.rb:6:in `require': cannot load such file -- action_mailer/railtie (LoadError) 
from /Users/AaronWilliamson/Desktop/ripelist/config/application.rb:6:in `<top (required)>' 
from /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `require' 
from /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `block in server' 
from /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap' 
from /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server' 
from /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!' 
from /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>' 
from bin/rails:4:in `require' 
from bin/rails:4:in `<main>' 

的Gemfile:

source 'https://rubygems.org' 

gem 'rails' 
gem 'pg' 
gem 'sass-rails' 
gem 'uglifier' 
gem 'coffee-rails' 
gem 'jquery-rails' 
gem 'turbolinks' 
gem 'bcrypt' 
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git" 
gem 'bootstrap-sass' 
gem 'email_validator' 
gem 'devise' 

group :development do 
    gem 'better_errors' 
    gem 'binding_of_caller' 
    gem 'quiet_assets' 
    gem 'letter_opener' 
end 

group :test, :development do 
    gem 'rspec-rails' 
    gem 'factory_girl_rails' 
    gem 'launchy' 
    gem 'capybara' 
    gem 'faker' 
end 

group :test do 
    gem 'shoulda-matchers' 
end 

Gemfile.lock的:

GIT 
    remote: git://github.com/thoughtbot/paperclip.git 
    revision: 41da3a3c4c139964a9877c77220f94200d73c87a 
    specs: 
    paperclip (4.1.1) 
     activemodel (>= 3.0.0) 
     activesupport (>= 3.0.0) 
     cocaine (~> 0.5.3) 
     mime-types 

GEM 
    remote: https://rubygems.org/ 
    specs: 
    actionmailer (0.6.1) 
     actionpack (>= 0.9.5) 
    actionpack (4.1.0) 
     actionview (= 4.1.0) 
     activesupport (= 4.1.0) 
     rack (~> 1.5.2) 
     rack-test (~> 0.6.2) 
    actionview (4.1.0) 
     activesupport (= 4.1.0) 
     builder (~> 3.1) 
     erubis (~> 2.7.0) 
    activemodel (4.1.0) 
     activesupport (= 4.1.0) 
     builder (~> 3.1) 
    activerecord (4.1.0) 
     activemodel (= 4.1.0) 
     activesupport (= 4.1.0) 
     arel (~> 5.0.0) 
    activesupport (4.1.0) 
     i18n (~> 0.6, >= 0.6.9) 
     json (~> 1.7, >= 1.7.7) 
     minitest (~> 5.1) 
     thread_safe (~> 0.1) 
     tzinfo (~> 1.1) 
    addressable (2.3.6) 
    arel (5.0.1.20140414130214) 
    bcrypt (3.1.7) 
    better_errors (1.1.0) 
     coderay (>= 1.0.0) 
     erubis (>= 2.6.6) 
    binding_of_caller (0.7.2) 
     debug_inspector (>= 0.0.1) 
    bootstrap-sass (3.1.1.1) 
     sass (~> 3.2) 
    builder (3.2.2) 
    capybara (2.2.1) 
     mime-types (>= 1.16) 
     nokogiri (>= 1.3.3) 
     rack (>= 1.0.0) 
     rack-test (>= 0.5.4) 
     xpath (~> 2.0) 
    climate_control (0.0.3) 
     activesupport (>= 3.0) 
    cocaine (0.5.4) 
     climate_control (>= 0.0.3, < 1.0) 
    coderay (1.1.0) 
    coffee-rails (4.0.1) 
     coffee-script (>= 2.2.0) 
     railties (>= 4.0.0, < 5.0) 
    coffee-script (2.2.0) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.7.0) 
    debug_inspector (0.0.2) 
    devise (3.2.4) 
     bcrypt (~> 3.0) 
     orm_adapter (~> 0.1) 
     railties (>= 3.2.6, < 5) 
     thread_safe (~> 0.1) 
     warden (~> 1.2.3) 
    diff-lcs (1.2.5) 
    email_validator (1.4.0) 
     activemodel 
    erubis (2.7.0) 
    execjs (2.0.2) 
    factory_girl (4.4.0) 
     activesupport (>= 3.0.0) 
    factory_girl_rails (4.4.1) 
     factory_girl (~> 4.4.0) 
     railties (>= 3.0.0) 
    faker (1.3.0) 
     i18n (~> 0.5) 
    hike (1.2.3) 
    i18n (0.6.9) 
    jquery-rails (3.1.0) 
     railties (>= 3.0, < 5.0) 
     thor (>= 0.14, < 2.0) 
    json (1.8.1) 
    launchy (2.4.2) 
     addressable (~> 2.3) 
    letter_opener (1.2.0) 
     launchy (~> 2.2) 
    mime-types (2.2) 
    mini_portile (0.5.3) 
    minitest (5.3.3) 
    multi_json (1.9.3) 
    nokogiri (1.6.1) 
     mini_portile (~> 0.5.0) 
    orm_adapter (0.5.0) 
    pg (0.17.1) 
    quiet_assets (1.0.2) 
     railties (>= 3.1, < 5.0) 
    rack (1.5.2) 
    rack-test (0.6.2) 
     rack (>= 1.0) 
    rails (0.9.5) 
     actionmailer (>= 0.6.1) 
     actionpack (>= 1.4.0) 
     activerecord (>= 1.6.0) 
     rake (>= 0.4.15) 
    railties (4.1.0) 
     actionpack (= 4.1.0) 
     activesupport (= 4.1.0) 
     rake (>= 0.8.7) 
     thor (>= 0.18.1, < 2.0) 
    rake (10.3.1) 
    rspec-core (2.14.8) 
    rspec-expectations (2.14.5) 
     diff-lcs (>= 1.1.3, < 2.0) 
    rspec-mocks (2.14.6) 
    rspec-rails (2.14.2) 
     actionpack (>= 3.0) 
     activemodel (>= 3.0) 
     activesupport (>= 3.0) 
     railties (>= 3.0) 
     rspec-core (~> 2.14.0) 
     rspec-expectations (~> 2.14.0) 
     rspec-mocks (~> 2.14.0) 
    sass (3.3.6) 
    sass-rails (4.0.1) 
     railties (>= 4.0.0, < 5.0) 
     sass (>= 3.1.10) 
     sprockets-rails (~> 2.0.0) 
    shoulda-matchers (2.6.0) 
     activesupport (>= 3.0.0) 
    sprockets (2.12.1) 
     hike (~> 1.2) 
     multi_json (~> 1.0) 
     rack (~> 1.0) 
     tilt (~> 1.1, != 1.3.0) 
    sprockets-rails (2.0.1) 
     actionpack (>= 3.0) 
     activesupport (>= 3.0) 
     sprockets (~> 2.8) 
    thor (0.19.1) 
    thread_safe (0.3.3) 
    tilt (1.4.1) 
    turbolinks (2.2.2) 
     coffee-rails 
    tzinfo (1.1.0) 
     thread_safe (~> 0.1) 
    uglifier (2.5.0) 
     execjs (>= 0.3.0) 
     json (>= 1.8.0) 
    warden (1.2.3) 
     rack (>= 1.0) 
    xpath (2.0.0) 
     nokogiri (~> 1.3) 

PLATFORMS 
    ruby 

DEPENDENCIES 
    bcrypt 
    better_errors 
    binding_of_caller 
    bootstrap-sass 
    capybara 
    coffee-rails 
    devise 
    email_validator 
    factory_girl_rails 
    faker 
    jquery-rails 
    launchy 
    letter_opener 
    paperclip! 
    pg 
    quiet_assets 
    rails 
    rspec-rails 
    sass-rails 
    shoulda-matchers 
    turbolinks 
    uglifier 

config/application.rb

require File.expand_path('../boot', __FILE__) 

# Pick the frameworks you want: 
require "active_record/railtie" 
require "action_controller/railtie" 
require "action_mailer/railtie" 
require "sprockets/railtie" 
# require "rails/test_unit/railtie" 

# Require the gems listed in Gemfile, including any gems 
# you've limited to :test, :development, or :production. 
Bundler.require(*Rails.groups) 

module Ripelist 
    class Application < Rails::Application 
    # Settings in config/environments/* take precedence over those specified here. 
    # Application configuration should go into files in config/initializers 
    # -- all .rb files in that directory are automatically loaded. 

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 
    # config.time_zone = 'Central Time (US & Canada)' 

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 
    # config.i18n.default_locale = :de 
    end 
end 

我的Rails -v是4.1.0 我的红宝石-v是红宝石2.1.0p0(2013年12月25日修订44422)x86_64的-darwin13.0]

最后要注意,当我运行bundle update,没有任何变化。

有人可以点我在正确的方向?我一直在修补几天。谢谢。

回答

0

根据您Gemfile.lock你正在使用的版本0.9.5轨道。

编辑您的Gemfile并更改第三行:

gem 'rails', '4.1.0' 

然后运行bundle update