###前提・実現したいこと
ここに質問したいことを詳細に書いてください
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
初めてrailsでアプリを作っています。
そこで公開しようと、Herokuのサーバーを使おうと考えました。
しかし、デプロイしようとした時に以下のエラーメッセージが発生しました。
###発生している問題・エラーメッセージ
エラーメッセージ bundle exec rake -P を実行した時 NameError: undefined local variable or method `config' for main:Object application.rb:5:in `<top (required)>' Rakefile:4:in `require_relative' Rakefile:4:in `<top (required)>' .rbenv/versions/2.3.1/bin/bundle:23:in `load' .rbenv/versions/2.3.1/bin/bundle:23:in `<main>' (See full trace by running task with --trace)
###該当のソースコード
applecation.rb require_relative 'boot' require 'rails/all' config.time_zone = 'tokyo' config.active_record.default_timezone = :local config.force_ssl = true # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module OTOSHIMONO 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. end end Rakefile # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative 'config/application' Rails.application.load_tasks
###試したこと
自分なりにググり修正したんですが全く改善されませんでした。
お力添え願いたいです。
###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/22 01:52
退会済みユーザー
2016/11/22 06:45
2016/11/22 14:13