Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't find file 'i18n/embed' with type 'application/javascript' #2016

Closed
alsaleem00 opened this issue Oct 5, 2018 · 11 comments
Closed

couldn't find file 'i18n/embed' with type 'application/javascript' #2016

alsaleem00 opened this issue Oct 5, 2018 · 11 comments
Labels
support A user needs help setting up their development environment

Comments

@alsaleem00
Copy link

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:in call'
test/integration/user_blocks_test.rb:42:in `test_api_revoke'

@tomhughes tomhughes added the support A user needs help setting up their development environment label Oct 5, 2018
@alsaleem00
Copy link
Author

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?

@tomhughes
Copy link
Member

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.

@alsaleem00
Copy link
Author

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.

@alsaleem00
Copy link
Author

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

@tomhughes
Copy link
Member

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.

@tomhughes tomhughes reopened this Oct 6, 2018
@alsaleem00
Copy link
Author

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.

@alsaleem00
Copy link
Author

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)

@alsaleem00
Copy link
Author

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.

@tomhughes
Copy link
Member

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.

@tomhughes
Copy link
Member

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.

@tomhughes
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support A user needs help setting up their development environment
Projects
None yet
Development

No branches or pull requests

2 participants