2

I upgraded to Mountain Lion and my nice stable ruby environment went crazy on me.

My current issue is that my Rails Server exits on me:

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

So I ran a bundle install, and now I'm not sure what the issue is as my gems are up to date:

Ayman$ gem list

*** LOCAL GEMS ***

actionmailer (3.2.8, 3.2.6)
actionpack (3.2.8, 3.2.6)
activemodel (3.2.8, 3.2.6)
activerecord (3.2.8, 3.2.6)
activeresource (3.2.8, 3.2.6)
activesupport (3.2.8, 3.2.6)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.5)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
json (1.7.5, 1.7.3)
mail (2.4.4)
mime-types (1.19)
multi_json (1.3.6)
mysql2 (0.3.11)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.8, 3.2.6)
railties (3.2.8, 3.2.6)
rake (0.9.2.2)
rdoc (3.12)
rubygems-update (1.8.24)
sass (3.1.19)
sass-rails (3.2.5)
sprockets (2.1.3)
thor (0.15.3)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.5)

Any clue as to what could be causing this issue? Thanks!

aceofbassgreg
  • 3,837
  • 2
  • 32
  • 42
aalab002
  • 357
  • 2
  • 4
  • 12
  • Could you post the offending line(s) of code, which you can see from the output log: `<...>/active_support/dependencies.rb:245:in 'load': <...>/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)'`. From this, it looks like the error is in your code, not your upgrade. – Kyle Lacy Aug 24 '12 at 04:13
  • My guess is your default ruby is now ruby 1.8, while your code is written for ruby 1.9. What does `ruby -v` show you? – Casper Aug 24 '12 at 04:16
  • @Casper It appears you are right. I am running 1.8.7 which is weird because I was running 1.9.3 before. Now if only RVM was working... Circle backing shortly once that is fixed! – aalab002 Aug 24 '12 at 04:21
  • @Casper Here's my RVM issue : http://stackoverflow.com/questions/12103113/rvm-not-working-after-installing-properly – aalab002 Aug 24 '12 at 04:23
  • @Casper Ok casper I fixed my RVM issue and now I am trying to change my default ruby lang. Here is my terminal output: `Ayman$ rvm -v` `rvm 1.15.5 (stable) ...` `Ayman$ rvm list` `rvm rubies` `ruby-1.9.2-p320 [ x86_64 ]` `=* ruby-1.9.3-p194 [ x86_64 ]` `# => - current `# =* - current && default` `# * - default` `Ayman$ rvm --default use ruby-1.9.3-p134` `RVM is not a function, selecting rubies with 'rvm use ...' will not work. You need to change your terminal settings to allow shell login. Please visit https://rvm.io/workflow/screen/ for example.` – aalab002 Aug 24 '12 at 05:01
  • 1
    Ok I fixed the RVM issue (See my profile for that question). Updated the language to 1.9.3 and everything works! Thank you all for the help! – aalab002 Aug 24 '12 at 16:01
  • 1
    Hi aalab002, you might consider adding your solution as an answer to this question (and then accept it) so that this no longer shows up as an unanswered question. – zippy Nov 05 '12 at 15:28
  • @aalab002 - If you're game to recap the solution as your own answer, I'll delete my answer. (See http://meta.stackexchange.com/questions/90263/unanswered-question-answered-in-comments for elaboration of why this is helpful.) Thanks! – DreadPirateShawn Oct 09 '13 at 16:26

1 Answers1

1

Copying the answer from the comments in order to remove this question from the "Unanswered" filter:

@Casper It appears you are right. I am running 1.8.7 which is weird because I was running 1.9.3 before.

...

Updated the language to 1.9.3 and everything works! Thank you all for the help!

~ answer per aalab002

Community
  • 1
  • 1
DreadPirateShawn
  • 8,164
  • 4
  • 49
  • 71