SyntaxError on welcome screen on rails using Pow

I just created a new project that displays all the correct information in the window of your application environment when on http: // localhost: 3000 / , but when I run it on http://egg.dev/ I get:

SyntaxError: /users/davidhall/work/egg/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end ...sion_store :cookie_store, key: '_egg_session' ^ 

I am sure that I had this problem before, because of which I used rails 3.1 with ruby ​​1.8.7, the problem was solved when I used ruby ​​1.9.2. Now I get when using 1.9.2.

Thanks for any help he really appreciates!

+6
source share
3 answers

As you can read in the Pow User Guide in paragraph 2.3, you should add .rvmrc to the root directory of your project using the contents of rvm 1.9.2 . Then it should work!

+6
source

The problem is that in Ruby1.9.2 there is a new style hash style argument, but is not available in Ruby1.8.7, which

 key: value # only available in 1.9.2 || :key => value # available in 1.8.7 and 1.9.2 

therefore, with less effort, you can simply change the syntax to the one recognized by 1.8.7.

+33
source

I solved this by deleting the ~ / .rvm directory and reinstalling RVM.

0
source

Source: https://habr.com/ru/post/895455/


All Articles