简体   繁体   中英

Installation issues using RailsApps composer tool for any example app

I am using Ruby 2.2.2 & Rails 4.2.1, with RVM on Ubuntu 14.04 with node.js.

For any example app I attempt to create, I'm experiencing a recurrent error during the composer process. I suspect the issue is parsing the yaml file -- secrets.yml, but I see nothing unusual (compared to other rails apps). I've experimented with different app servers and explicitly naming secrets in devlopment.rb with no luck. I'd appreciate some direction to look next.

init  applying migrations and seeding the database
run    bundle exec rake db:migrate from "."
rake aborted!
Psych::SyntaxError: (<unknown>): did not find URI escaped octet while parsing a tag at line 18 column 28
/home/ron/projects/rails-stripe-membership-saas/config/environments/development.rb:33:in `block in <top (required)>'
...
run    bundle exec rake db:seed from "."
rake aborted!
Psych::SyntaxError: (<unknown>): did not find URI escaped octet while parsing a tag at line 18 column 28
/home/ron/projects/rails-stripe-membership-saas/config/environments/development.rb:33:in `block in <top (required)>'
...
generate    layout:devise bootstrap3 -f
/home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): did not find URI escaped octet while parsing a tag at line 18 column 28 (Psych::SyntaxError)
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:318:in `parse'
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:245:in `load'
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:391:in `secrets'
  from /home/ron/projects/rails-stripe-membership-saas/config/environments/development.rb:33:in `block in <top (required)>'
...
generate    layout:navigation -f
/home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): did not find URI escaped octet while parsing a tag at line 18 column 28 (Psych::SyntaxError)
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:318:in `parse'
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/2.2.0/psych.rb:245:in `load'
  from /home/ron/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:391:in `secrets'
  from /home/ron/projects/rails-stripe-membership-saas/config/environments/development.rb:33:in `block in <top (required)>'

The issue had to do with pre-existing environment variables in .bashrc, although I am not clear what the problem was. I commented out those lines, which enabled composer to install the app properly. The format of those variables seem proper and had not caused issues in the past. It became clear there was a problem parsing Rails.appplication.secrets. I suspect a conflict when you have existing ENV and are using secrets.yml in development.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM