Openstreetmap-website: couldn't find file 'i18n/embed' with type 'application/javascript'

Created on 6 Oct 2018  Â·  11Comments  Â·  Source: openstreetmap/openstreetmap-website

I am installing the openstreetmap website on a local ubuntu 16.04 vm.
I followed all instructions (fixed many dependencies) and passed all the steps up to the test stage, where I get this error (10's of it!).
Did I miss any pre-requesites or installation requirement?

Error:
UserBlocksTest#test_api_revoke:
ActionView::Template::Error: couldn't find file 'i18n/embed' with type 'application/javascript'
Checked in these paths:
/home/osm/openstreetmap-website/app/assets/favicons
/home/osm/openstreetmap-website/app/assets/images
/home/osm/openstreetmap-website/app/assets/javascripts
/home/osm/openstreetmap-website/app/assets/opensearch
/home/osm/openstreetmap-website/app/assets/stylesheets
/home/osm/openstreetmap-website/vendor/assets/augment.js
/home/osm/openstreetmap-website/vendor/assets/bootstrap
/home/osm/openstreetmap-website/vendor/assets/iD
/home/osm/openstreetmap-website/vendor/assets/javascripts
/home/osm/openstreetmap-website/vendor/assets/jquery
/home/osm/openstreetmap-website/vendor/assets/leaflet
/home/osm/openstreetmap-website/vendor/assets/ohauth
/home/osm/openstreetmap-website/vendor/assets/openlayers
/home/osm/openstreetmap-website/vendor/assets/potlatch2
/home/osm/openstreetmap-website/vendor/assets/swfobject
/var/lib/gems/2.3.0/gems/i18n-js-3.0.11/app/assets/javascripts
/var/lib/gems/2.3.0/gems/jquery-rails-4.3.3/vendor/assets/javascripts
/var/lib/gems/2.3.0/gems/coffee-rails-4.2.2/lib/assets/javascripts
/var/lib/gems/2.3.0/gems/actioncable-5.2.0/lib/assets/compiled
/var/lib/gems/2.3.0/gems/activestorage-5.2.0/app/assets/javascripts
/var/lib/gems/2.3.0/gems/actionview-5.2.0/lib/assets/compiled
/home/osm/openstreetmap-website/config
app/assets/javascripts/embed.js.erb:4
app/views/users/login.html.erb:2:in block in _app_views_users_login_html_erb__901722931127960965_129601120' app/views/users/login.html.erb:1:in_app_views_users_login_html_erb__901722931127960965_129601120'
config/initializers/cors.rb:9:in call' config/initializers/compressed_requests.rb:27:incall'
test/integration/user_blocks_test.rb:42:in `test_api_revoke'

support

Most helpful comment

You need to run bundle exec rake i18n:js:export or visit the site in your web browser which will trigger an export automatically in development mode.

All 11 comments

I see this line in /config/i18n-js.yml :
file: "app/assets/javascripts/i18n/embed.js"
In the installation, I do not see "i18n" folder under "app/assets/javascript" folder. Missing?

You need to run bundle exec rake i18n:js:export or visit the site in your web browser which will trigger an export automatically in development mode.

Great. It is working now

Finished in 228.922569s, 4.9842 runs/s, 1575.2095 assertions/s.
1141 runs, 360601 assertions, 0 failures, 0 errors, 0 skips

Thanks. Appreciate help.

FYI.
(phantomjs, gifsicle, pngcrush, pngquant, pngquant, svgo ....) are missing from the installation instructions.

They're also mostly optional - the only thing that is required is phantomjs I think.

Please don't close this though - there is an issue here that needs addressing.

Yes. I will keep it open.
I passed the test, but now nothing is coming out of (http://localhost:3000). The browser keeps waiting (busy icon) for long time.

this is logs on starting the server and browsing the site

=> Booting Puma
=> Rails 5.2.0 application starting in development
=> Run rails server -h for more startup options
Puma starting in single mode...

  • Version 3.12.0 (ruby 2.3.1-p112), codename: Llamas in Pajamas
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://0.0.0.0:3000
    Use Ctrl-C to stop
    Started GET "/" for 127.0.0.1 at 2018-10-06 16:48:58 +0300
    (15.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
    ↳ /var/lib/gems/2.3.0/gems/activerecord-5.2.0/lib/active_record/log_subscriber.rb:98
    Processing by SiteController#index as HTML
    Rendering site/index.html.erb within layouts/map
    Rendered site/index.html.erb within layouts/map (2.1ms)

May I know the status of this issue? Why it has been closed?
I still cannot get response of the server as mentioned above.
Is waiting normal? Or it just does not have map data?

Thanks.

This ticket is about the issue with embed.js and I have just fixed that in the referenced commit.

The other issue is unrelated and appears to be some sort of local envirissueonmental issue - the server reports it has rendered the page so you will need to investigate why your browser is not displaying that.

For what it's worth I see the same thing with rails server but I have no idea why, and that's just standard rails framework stuff and nothing to do with us.

I normally use apache+passenger with my dev environment so hadn't seen it as I don't often run with puma - it certainly was working when I last tried it but I have no idea when that was.

Oh actually it did work eventually, it was just very slow ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhouhana picture zhouhana  Â·  6Comments

tyrasd picture tyrasd  Â·  5Comments

jidanni picture jidanni  Â·  5Comments

RobJN picture RobJN  Â·  6Comments

hikemaniac picture hikemaniac  Â·  3Comments