OpenShift에 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
레일 콘솔을 열고'RUBY_VERSION'을 입력하면 어떻게됩니까? –