tenex / rails-assets

The solution to assets management in Rails
https://rails-assets.org
MIT License
1.63k stars 69 forks source link

Adding any component yields server error 500 #443

Closed jaybloke closed 5 years ago

jaybloke commented 5 years ago

Seems to be happening with any component added to Rails Assets... e.g.

curl -H "Content-Type: application/json" -X POST -d "{ \"component\": { \"name\": \"formrenderer-base\", \"version\": \"1.3.8\" } }" "https://rails-assets.org/components"

yields:

<!DOCTYPE html>
<html>
<head>
  <title>We're sorry, but something went wrong (500)</title>
  <style>
  body {
    background-color: #EFEFEF;
    color: #2E2F30;
    text-align: center;
    font-family: arial, sans-serif;
  }

  div.dialog {
    width: 25em;
    margin: 4em auto 0 auto;
    border: 1px solid #CCC;
    border-right-color: #999;
    border-left-color: #999;
    border-bottom-color: #BBB;
    border-top: #B00100 solid 4px;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    background-color: white;
    padding: 7px 4em 0 4em;
  }

  h1 {
    font-size: 100%;
    color: #730E15;
    line-height: 1.5em;
  }

  body > p {
    width: 33em;
    margin: 0 auto 1em;
    padding: 1em 0;
    background-color: #F7F7F7;
    border: 1px solid #CCC;
    border-right-color: #999;
    border-bottom-color: #999;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-color: #DADADA;
    color: #666;
    box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
  }
  </style>
</head>

<body>
  <!-- This file lives in public/500.html -->
  <div class="dialog">
    <h1>We're sorry, but something went wrong.</h1>
  </div>
  <p>If you are the application owner check the logs for more information.</p>
</body>
</html>
davegudge commented 5 years ago

I'm getting the same issue. Is http://rails-assets.org still being maintained?

joshjordan commented 5 years ago

Of course! But this bug has still eluded us. Some components complete successfully, and the logs have not pointed us at anything useful thus far when it fails. Pull requests welcome.

davegudge commented 5 years ago

I'm trying to add https://github.com/ilyashubin/scrollbooster. It does not contain a bower.json file, so I have forked and generate one here https://github.com/skillstream/scrollbooster/blob/master/bower.json via:

 bower init
? name scrollbooster
? description Enjoyable content drag-to-scroll library
? main file dist/scrollbooster.min.js
? keywords drag,draggable,scroll,scrollable,UI,microlibrary
? authors Ilya Shubin <pixelwake@gmail.com>
? license MIT
? homepage https://ilyashubin.github.io/scrollbooster/
? set currently installed components as dependencies? Yes
? add commonly ignored files to ignore list? Yes
? would you like to mark this package as private which prevents it from being accidentally published to the registry? No

{
  name: 'scrollbooster',
  description: 'Enjoyable content drag-to-scroll library',
  main: 'dist/scrollbooster.min.js',
  authors: [
    'Ilya Shubin <pixelwake@gmail.com>'
  ],
  license: 'MIT',
  keywords: [
    'drag',
    'draggable',
    'scroll',
    'scrollable',
    'UI',
    'microlibrary'
  ],
  homepage: 'https://ilyashubin.github.io/scrollbooster/',
  ignore: [
    '**/.*',
    'node_modules',
    'bower_components',
    'test',
    'tests'
  ]
}
Generate bower file

I then executed: bower register scrollbooster git://github.com/skillstream/scrollbooster.git to register it. I then tried to add via https://rails-assets.org/components/new, but I am getting a 500 response.

Hopefully the detail above will be of some help in tracking down the issue. Perhaps I need to wait some time before it's registered on bower?

joshjordan commented 5 years ago

That is helpful, thank you. FWIW, I don't think you should have to wait - it should be able to pick it up immediately. Let me do some digging.

davegudge commented 5 years ago

Thanks @joshjordan. I'm not that familar with bower, so I could be doing something wrong on that side of things.

joshjordan commented 5 years ago

@davegudge please try again

davegudge commented 5 years ago

👍

Success: rails-assets-skillstream--scrollbooster has been created. It will be indexed and available for bundler in few minutes.

Thank you @joshjordan