g00dL00Ks / ruby

New GoodLooks site built on ruby!
0 stars 0 forks source link

Password for Rails_Admin #20

Open g00dL00Ks opened 8 years ago

g00dL00Ks commented 8 years ago

@bradenmugg I wanted to add a password for rails admin b/c i don't like our user data being accessible to anyone.

I used this approach: https://demisx.github.io/rails-admin/2014/05/07/authentication-rails-admin-without-devise.html

and tested locally. It worked great locally

I then went to push to the git and kept getting errors about fast-forward updates. I tried a git pull, but my files were up to date with the master. I tried the variety of techniques including those here: http://stackoverflow.com/questions/9794413/failed-to-push-some-refs-to-githeroku-com When i tried to push to heroku I got the error you'll see at the bottom.

Eventually, I deleted all the other branches on git and that allowed me to push to git without any errors. Phew.

However, when I pushed to Heroku, I still got the same error. I did a git pull heroku master and was told my files are up to date

Then following the comments here: http://stackoverflow.com/questions/13712012/error-pushing-to-heroku-aborting-my-rake-assetsprecompile I put

config.assets.initialize_on_precompile = false

in the application.rb file. When I pushed live the heroku commit did go through but it crashed the site. eek! Luckily it's only on the staging server: insider.marsmerize.com

Now when I remove this link from the application.rb file, I am unable to re-upload to heroku. So I'm stuck with a down site... can you please help?

remote:        Bundle completed (12.03s)
remote:        Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        Psych::SyntaxError: (<unknown>): mapping values are not allowed i
n this context at line 29 column 9
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/application.rb:325:in `secrets'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/devise-3.5.5/lib/devise/rails.rb:34:in `block in <class:Engine>'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializ
ers'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/config/environment.rb
:5:in `<top (required)>'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'

remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in
 require'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dep
endency'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'

remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/application.rb:276:in `require_environment!'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/railties-4.1.8/lib/rails/application.rb:389:in `block in run_tasks_bloc
ks'
remote:        /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2.
0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 level
s) in define'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:
remote:  !     Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to goodlooks.
remote:
To https://git.heroku.com/goodlooks.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/goodlooks.git'
bradenmugg commented 8 years ago

I'll have a look pretty soon, and see if I can get to the bottom of it. On Jan 26, 2016 8:32 PM, "g00dL00Ks" notifications@github.com wrote:

@bradenmugg https://github.com/bradenmugg I wanted to add a password for rails admin b/c i don't like our user data being accessible to anyone.

I used this approach: https://demisx.github.io/rails-admin/2014/05/07/authentication-rails-admin-without-devise.html

and tested locally. It worked great locally

I then went to push to the git and kept getting errors about fast-forward updates. I tried a git pull, but my files were up to date with the master. I tried the variety of techniques including those here:

http://stackoverflow.com/questions/9794413/failed-to-push-some-refs-to-githeroku-com When i tried to push to heroku I got the error you'll see at the bottom.

Eventually, I deleted all the other branches on git and that allowed me to push to git without any errors. Phew.

However, when I pushed to Heroku, I still got the same error. I did a git pull heroku master and was told my files are up to date

Then following the comments here:

http://stackoverflow.com/questions/13712012/error-pushing-to-heroku-aborting-my-rake-assetsprecompile I put

config.assets.initialize_on_precompile = false

in the application.rb file. When I pushed live the heroku commit did go through but it crashed the site. eek! Luckily it's only on the staging server: insider.marsmerize.com

Now when I remove this link from the application.rb file, I am unable to re-upload to heroku. So I'm stuck with a down site... can you please help?

remote: Bundle completed (12.03s) remote: Cleaning up the bundler cache. remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: rake aborted! remote: Psych::SyntaxError: (): mapping values are not allowed i n this context at line 29 column 9 remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:325:in secrets' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/devise-3.5.5/lib/devise/rails.rb:34:inblock in class:Engine' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in instance_exec' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:inrun' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in block in run_initializ ers' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:inrun_initializers' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:300:in initialize!' remote: /tmp/build_07d907521a77f5256c407f6958841848/config/environment.rb :5:in<top (required)>' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'

remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in block in require' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:inload_dep endency' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'

remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:276:in require_environment!' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:389:inblock in run_tasks_bloc ks' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 level s) in define' remote: Tasks: TOP => environment remote: (See full trace by running task with --trace) remote: ! remote: ! Precompiling assets failed. remote: ! remote: remote: ! Push rejected, failed to compile Ruby app remote: remote: Verifying deploy... remote: remote: ! Push rejected to goodlooks. remote: To https://git.heroku.com/goodlooks.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/goodlooks.git'

— Reply to this email directly or view it on GitHub https://github.com/g00dL00Ks/ruby/issues/20.

g00dL00Ks commented 8 years ago

Thanks! good thing it's the staging site. here's the message from heroku:

App crashed: Heroku/goodlooks

2016-01-27 01:21:24.873
289 <158>1 2016-01-27T01:21:24.684073+00:00 heroku router - - at=error code=H10 desc="App crashed" method=GET path="/" host=insider.marsmerize.com request_id=a945bdeb-137c-4ff5-80d1-ab412ce05b03 fwd="52.8.77.83" dyno= connect= service= status=503 bytes=

Go to the log: https://api.heroku.com/myapps/app46131447@heroku.com/addons/logentries

You are receiving this email because your Logentries alarm "App crashed"
has been triggered.

In context:
2016-01-27 01:18:13.775 119 <190>1 2016-01-27T01:18:13.399993+00:00 app web.1 - -   bin/rails:4:in `require'
2016-01-27 01:18:13.775 118 <190>1 2016-01-27T01:18:13.399994+00:00 app web.1 - -   bin/rails:4:in `<main>'
2016-01-27 01:18:13.775 143 <190>1 2016-01-27T01:18:13.400063+00:00 app web.1 - - [2016-01-27 01:18:13] INFO  going to shutdown ...
2016-01-27 01:18:13.775 153 <190>1 2016-01-27T01:18:13.400116+00:00 app web.1 - - [2016-01-27 01:18:13] INFO  WEBrick::HTTPServer#start done.
2016-01-27 01:18:13.851 101 <190>1 2016-01-27T01:18:13.400149+00:00 app web.1 - - Exiting
2016-01-27 01:18:21.909 217 <190>1 2016-01-27T01:18:21.546452+00:00 app web.1 - - /app/config/application.rb:5:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in `require'
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in `block in server'
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'
2016-01-27 01:18:22.705 124 <45>1 2016-01-27T01:18:22.456372+00:00 heroku web.1 - - Process exited with status 1
2016-01-27 01:18:39.088 291 <158>1 2016-01-27T01:18:38.873437+00:00 heroku router - - at=error code=H10 desc="App crashed" method=GET path="/" host=insider.marsmerize.com request_id=65c8408a-262a-496b-b6a7-8c104a0ad547 fwd="23.240.45.66" dyno= connect= service= status=503 bytes=
2016-01-27 01:19:44.895 129 <190>1 2016-01-27T01:19:44.862694+00:00 heroku slug-compiler - - Slug compilation started
2016-01-27 01:19:44.971 156 <190>1 2016-01-27T01:19:44.862699+00:00 heroku slug-compiler - - Slug compilation failed: failed to compile Ruby app
2016-01-27 01:21:24.873 289 <158>1 2016-01-27T01:21:24.684073+00:00 heroku router - - at=error code=H10 desc="App crashed" method=GET path="/" host=insider.marsmerize.com request_id=a945bdeb-137c-4ff5-80d1-ab412ce05b03 fwd="52.8.77.83" dyno= connect= service= status=503 bytes=
g00dL00Ks commented 8 years ago

We do have actual people registered on experts.goodlooks.mehttp://experts.goodlooks.me so we don't want to lose any of that data or crash that site

On Tue, Jan 26, 2016 at 5:35 PM -0800, "Braden Perez-Mugg" notifications@github.com<mailto:notifications@github.com> wrote:

I'll have a look pretty soon, and see if I can get to the bottom of it. On Jan 26, 2016 8:32 PM, "g00dL00Ks" notifications@github.com wrote:

@bradenmugg https://github.com/bradenmugg I wanted to add a password for rails admin b/c i don't like our user data being accessible to anyone.

I used this approach: https://demisx.github.io/rails-admin/2014/05/07/authentication-rails-admin-without-devise.html

and tested locally. It worked great locally

I then went to push to the git and kept getting errors about fast-forward updates. I tried a git pull, but my files were up to date with the master. I tried the variety of techniques including those here:

http://stackoverflow.com/questions/9794413/failed-to-push-some-refs-to-githeroku-com When i tried to push to heroku I got the error you'll see at the bottom.

Eventually, I deleted all the other branches on git and that allowed me to push to git without any errors. Phew.

However, when I pushed to Heroku, I still got the same error. I did a git pull heroku master and was told my files are up to date

Then following the comments here:

http://stackoverflow.com/questions/13712012/error-pushing-to-heroku-aborting-my-rake-assetsprecompile I put

config.assets.initialize_on_precompile = false

in the application.rb file. When I pushed live the heroku commit did go through but it crashed the site. eek! Luckily it's only on the staging server: insider.marsmerize.com

Now when I remove this link from the application.rb file, I am unable to re-upload to heroku. So I'm stuck with a down site... can you please help?

remote: Bundle completed (12.03s) remote: Cleaning up the bundler cache. remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: rake aborted! remote: Psych::SyntaxError: (): mapping values are not allowed i n this context at line 29 column 9 remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:325:in secrets' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/devise-3.5.5/lib/devise/rails.rb:34:inblock in class:Engine' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in instance_exec' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:inrun' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in block in run_initializ ers' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:inrun_initializers' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:300:in initialize!' remote: /tmp/build_07d907521a77f5256c407f6958841848/config/environment.rb :5:in<top (required)>' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'

remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in block in require' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:inload_dep endency' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'

remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:276:in require_environment!' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/railties-4.1.8/lib/rails/application.rb:389:inblock in run_tasks_bloc ks' remote: /tmp/build_07d907521a77f5256c407f6958841848/vendor/bundle/ruby/2. 0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 level s) in define' remote: Tasks: TOP => environment remote: (See full trace by running task with --trace) remote: ! remote: ! Precompiling assets failed. remote: ! remote: remote: ! Push rejected, failed to compile Ruby app remote: remote: Verifying deploy... remote: remote: ! Push rejected to goodlooks. remote: To https://git.heroku.com/goodlooks.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/goodlooks.git'

Reply to this email directly or view it on GitHub https://github.com/g00dL00Ks/ruby/issues/20.

Reply to this email directly or view it on GitHubhttps://github.com/g00dL00Ks/ruby/issues/20#issuecomment-175333020.