I wanted to get ribbot an open source code from this git repository. I have already downloaded rails and its necessary gems, as well as mongo db and have “bundle installed”.
However I get the following error when running the project.
How can this be solved?
/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:
syntax error, unexpected ‘:’, expecting $end (SyntaxError)
…sion_store :cookie_store, key: ‘_ribbot_session’, :domain =>…
I have traced the file with the syntax error which is session_store.rb which currently looks like this:
# 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
since ribbot is using ruby 1.9 you should update your ruby version, rather than change the code to make it work, the current ruby version is 1.9.3
http://www.ruby-lang.org/en/downloads/
install instructions
http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac
http://www.rubyinside.com/how-to-install-ruby-1-9-2-and-rails-3-0-on-ubuntu-10-10-4148.html
http://rubyinstaller.org/