OpenShiftでRailsアプリケーションをセットアップし、デフォルトコードを取得しました。私はそれを実行しようとしたとき、私は次のエラーを受け取りました:Railsサーバーの起動中にエラーが発生しました: "unexpected .."
C:/Development/Ruby/lib/ruby/gems/2.3.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load': C:/HEATH3N/FirstApp/config/initializers/session_store.rb:1: syntax error, unexpected .. (SyntaxError)
../../.openshift/lib/session_store.rb
私は問題が何であるか不明です。私は問題のあるファイルを見て、間違ったことは見ない。私はファイルの別の問題を尋ねてStack Overflowに関する他の質問を見つけました。新しいハッシュスタイルは古いRubyバージョンではサポートされていませんが、Ruby 2.3(Rails 4.1.4)を使用しています。
require File.join(Rails.root,'lib','openshift_secret_generator.rb')
# Be sure to restart your server when you modify this file.
# Set token based on intialize_secret function (defined in initializers/secret_generator.rb)
Rails.application.config.session_store :cookie_store, :key => initialize_secret(
:session_store,
'_railsapp_session'
)
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
# RailsApp::Application.config.session_store :active_record_store
ファイルを投稿できますか? –
ああ、申し訳ありません...質問を更新しました。 – HEATH3N
rails consoleを開いて 'RUBY_VERSION'と入力するとどうなりますか? –