1

このgitリポジトリからribbotにオープンソースコードを取得したかったのです。私はすでにrailsとその必要なgem、およびmongo dbをダウンロードし、「バンドルをインストール」しています。ただし、プロジェクトの実行時に次のエラーが発生します。

これはどのように解決できますか?

/Library/Ruby/Gems/1.8/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in `load':/Users/hansarijanto/Desktop/Impact/ribbot/config/initializers/session_store.rb :4:

構文エラー、予期しない':'、$ end(SyntaxError)を予期しています... sion_store:cookie_store、key:'_ribbot_session'、:domain => .. ..

現在次のようになっているsession_store.rbという構文エラーでファイルをトレースしました。

# Be sure to restart your server when you modify this file.

# See environment specific overrides also
Ribbot::Application.config.session_store :cookie_store, key: '_ribbot_session', :domain => :all, :expire_after => 10.years

# 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")
# Ribbot::Application.config.session_store :active_record_sto
4

2 に答える 2

3

Ruby 1.8を使用していますが、でRuby1.9ハッシュ構文を使用していますconfig/initializers/session_store.rb。次のスニペット:

key: '_ribbot_session'

する必要があります

:key => '_ribbot_session'
于 2012-04-16T16:20:43.100 に答える
2

ribbotはruby1.9を使用しているため、コードを変更して機能させるのではなく、rubyのバージョンを更新する必要があります。現在のrubyのバージョンは1.9.3です 。http: //www.ruby-lang.org/en/downloads/

インストール手順

  • Mac OSを使用している場合:

http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac

  • ubuntu linuxを使用している場合:

http://www.rubyinside.com/how-to-install-ruby-1-9-2-and-rails-3-0-on-ubuntu-10-10-4148.html

于 2012-04-16T16:26:38.477 に答える