SORU
6 ŞUBAT 2015, Cuma


(Başlatılmamış sabit Ataç::Depo::S3::BÖLÜM) NameError:

Benim web uygulaması içine görüntüleri birleştirmek için çalışıyorum ve epeyce özellikleri çıkardıktan sonra bu hata rastlayıp duruyorum. Benim 'oluştur' uygulama denetleyici ve ben tamamen buradan nereye gitmem gerektiğini bilmiyorum. geldi

2015-02-06T20:30:12.292187 00:00 app[web.1]:    (1.9ms)  ROLLBACK
2015-02-06T20:30:12.296299 00:00 app[web.1]: NameError (uninitialized constant Paperclip::Storage::S3::AWS):
2015-02-06T20:30:12.296301 00:00 app[web.1]:   app/controllers/articles_controller.rb:24:in `create'
2015-02-06T20:45:14.691084 00:00 app[web.1]: [paperclip] saving /articles/images/000/000/013/original/git.jpeg
2015-02-06T20:45:14.698744 00:00 app[web.1]: Completed 500 Internal Server Error in 584ms
2015-02-06T20:45:14.700871 00:00 heroku[router]: at=info method=POST path="/articles" host=preston.herokuapp.com request_id=d9d02257-3616-4686-bce5-3d912cd528c2 fwd="76.22.102.38" dyno=web.1 connect=1ms service=698ms status=500 bytes=1754

Articles_controller.rb

class ArticlesController < ApplicationController
http_basic_authenticate_with name: "name", password: "password", except: [:index, :show]

    def index
        @articles = Article.all.order("created_at DESC")
    end

    def show
        @article = Article.find(params[:id])
    end

    def new
        @article = Article.new
    end 

    def edit
        @article = Article.find(params[:id])

    end

    def create
        @article = Article.new(article_params)

        if @article.save
          redirect_to @article
        else
            render 'new'
        end  
    end

    def update
        @article = Article.find(params[:id])

        if @article.update(article_params)
            redirect_to @article
        else
            render 'edit'
        end
    end

    def destroy
        @article = Article.find(params[:id])
        @article.destroy

        redirect_to articles_path
    end

    private

    def article_params
        params.require(:article).permit(:title, :text, :image)
    end
end

Gemfile

source 'https://rubygems.org'
ruby '2.0.0'

gem 'rails', '4.2.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'bootstrap-sass', '~> 3.3.3' 
gem 'autoprefixer-rails'
gem 'paperclip', '~> 4.2.1'
gem 'aws-sdk', '~> 2.0.22'

group :development, :test do
 gem 'byebug'
 gem 'web-console', '~> 2.0'
 gem 'spring'
 gem 'sqlite3'
end

group :production do
    gem 'pg'
    gem 'rails_12factor'
end

group :doc do
    gem 'sdoc', '~> 0.4.0', require: false
end

CEVAP
6 ŞUBAT 2015, Cuma


Senin Gemfile bölüm-sdk 2.0 öncesi bir sürümünü yüklemek için Değiştir

gem 'aws-sdk', '< 2.0'

Bu sorun bölüm-sdk yeni versiyonu (2.0 ) ile tanıştı. Daha fazla burada okuyabilirsiniz: http://ruby.awsblog.com/post/TxFKSK2QJE6RPZ/Upcoming-Stable-Release-of-AWS-SDK-for-Ruby-Version-2

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Caramella Girls

    Caramella Gi

    19 Mayıs 2008
  • kidrauhl

    kidrauhl

    15 Ocak 2007
  • WPBeginner - WordPress Tutorials

    WPBeginner -

    17 Temmuz 2009