Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7862079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:59:23+00:00 2026-06-02T22:59:23+00:00

So I came across this question ( Syntax error when creating a Rails model

  • 0

So I came across this question ( Syntax error when creating a Rails model ) which has an error similar to mine. I am deducing from it that my problem is using Ruby 1.8 instead of 1.9. I tried uninstalling the gems and updating rubygems as described in one of the answers, but that did not fix the issue. I also tried setting the default ruby via rvm to 1.9 – it works but it does not solve the issue.

When I run “gem env” I get the following:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23
  - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /home/owner/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

In usr/bin I have a “ruby” which is a symlink to usr/bin/ruby1.9.1.

Basically, I need to know how to change the ruby being used here (at least I think that will solve my issue).

My OS is Linux Mint 12.
Rails –version returns “Rails 3.2.3”

My full error is below (from running “rails s” in project directory):

=> Booting WEBrick
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load': /media/Windows/Users/Owner/Projects/rails_projects/sample_app/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)
...sion_store :cookie_store, key: '_sample_app_session'
                              ^
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/engine.rb:588
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/engine.rb:587:in `each'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/engine.rb:587
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `run_initializers'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `send'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /media/Windows/Users/Owner/Projects/rails_projects/sample_app/config/environment.rb:5
    from /media/Windows/Users/Owner/Projects/rails_projects/sample_app/config.ru:4:in `require'
    from /media/Windows/Users/Owner/Projects/rails_projects/sample_app/config.ru:4
    from /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
    from /media/Windows/Users/Owner/Projects/rails_projects/sample_app/config.ru:1:in `new'
    from /media/Windows/Users/Owner/Projects/rails_projects/sample_app/config.ru:1

My gemfile is:

source 'https://rubygems.org'

gem 'rails'
gem 'bootstrap-sass'
gem 'tilt'
gem 'execjs'
gem 'therubyracer', :platforms => :ruby

group :development do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails'
  gem 'guard-rspec', '0.5.5'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.0'

group :test do
  gem 'rspec-rails'
  gem 'capybara', '1.1.2'
  # System-dependent gems# Test gems on Windows
    group :test do
    gem 'rspec-rails'
    gem 'capybara', '1.1.2'
    gem 'rb-fchange', '0.0.5'
    gem 'rb-notifu', '0.0.4'
    end 
    gem 'guard-spork', '0.3.2'
    gem 'spork', '0.9.0'
end

group :production do
  gem 'pg', '0.12.2'
end

PATH:

echo $PATH
/usr/bin/rubycurrent:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

“which ruby” returns:

/usr/bin/rubycurrent/ruby
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:59:25+00:00Added an answer on June 2, 2026 at 10:59 pm

    So I finally figure it out. Here’s what I did.

    First, to troubleshoot I uninstalled ruby 1.8. After that I tried running rails s again and got the following error:

     bash: /usr/local/bin/rails: /usr/bin/ruby1.8: bad interpreter: No such file or directory
    

    When I checked /usr/local/bin/rails script I saw it was including /usr/bin/ruby1.8 at the top. After trying tons of different things to get it working, the only thing that worked was uninstalling ruby, rubygems, rails, and rvm, and reinstalling them all (I had to do this several times… finally it worked one time).

    You can try what is listed below to see if it works for you:
    http://fatal-errors.com/ubuntu-10-ruby-1-9-rails-3-not-working-solved/99008.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I came across this question about memory management of dictionaries, which mentions the intern
I came across this post , which reports the following interview question: Given two
I came across this question from interviewstreet.com Machines have once again attacked the kingdom
I came across this question on an interview questions thread. Here is the question:
I came across this question after searching for a ODBC or JDBC. To my
I came across this question: say given two weights 1 and 3, u can
I came across this question on transcender: What should you apply to a field
I came across this question on a website. As mentioned there, it was asked
I just came across this question about initializing local variables. Many of the answers
Today I came across this question: you have a code static int counter =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.