NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1
1

I made all the steps of a vagrant install And I connect to localhost:3000, I obtain an error 500 How I can solve it?

Here is the log in the ssh console:

[2015-04-05 10:37:58] INFO  ruby 1.9.3 (2011-10-30) [x86_64-linux]
[2015-04-05 10:37:58] INFO  WEBrick::HTTPServer#start: pid=27112 port=3000

Started GET "/" for 10.0.2.2 at 2015-04-05 10:39:28 +0000
  ActiveRecord::SchemaMigration Load (3.4ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by SiteController#index as HTML
  Rendered site/index.html.erb within layouts/map (33.2ms)
  Rendered layouts/_search.html.erb (530.9ms)
  Rendered layouts/_search.html.erb (31.8ms)
  Rendered layouts/_flash.html.erb (3.8ms)
  Rendered layouts/_head.html.erb (16128.2ms)
  Rendered layouts/site.html.erb (16237.5ms)
Completed 500 Internal Server Error in 33688ms (ActiveRecord: 0.0ms)

ActionView::Template::Error (Invalid CSS after "../common.scss": expected "{", was ""
  (in /srv/openstreetmap-website/app/assets/stylesheets/ltr/common.scss:2)):
    3:   
    4:   
    5:   <%= javascript_include_tag "application" %>
    6:   <%= stylesheet_link_tag "small-#{dir}", :media => "only screen and (max-width:721px)" %>
    7:   <%= stylesheet_link_tag "large-#{dir}", :media => "screen and (min-width: 722px)" %>
    8:   <%= stylesheet_link_tag "print-#{dir}", :media => "print" %>
    9:   <%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>
  app/assets/stylesheets/ltr/common.scss:2
  app/views/layouts/_head.html.erb:6:in `_app_views_layouts__head_html_erb__2680021569999862732_65660600'
  app/views/layouts/site.html.erb:3:in `_app_views_layouts_site_html_erb__4155754249160337287_65461020'
  app/views/layouts/map.html.erb:83:in `_app_views_layouts_map_html_erb__1229493903015393840_58573620'
  config/initializers/cors.rb:9:in `call'


  Rendered /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (120.4ms)
  Rendered /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (31.3ms)
  Rendered /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (5.5ms)
  Rendered /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (258.2ms)

asked 05 Apr '15, 11:57

Titi9876's gravatar image

Titi9876
26112
accept rate: 0%

edited 05 Apr '15, 12:38

scai's gravatar image

scai ♦
33.3k21309459

2

Which steps did you do? Which manual/instructions did you use?

(06 Apr '15, 03:16) erik
2

I used the vagrant.md instructions.

https://github.com/openstreetmap/openstreetmap-website/blob/master/VAGRANT.md

I downloaded vagrant for windows I installed it I installed github for windows, because I needed ssh, and git I have done the tutorial of vagrant Then I destroyed the vagrant used for the tutorial

Then I did what is described in the vagrant.md git clone git@github.com:openstreetmap/openstreetmap-website.git cd openstreetmap-website vagrant up vagrant ssh

then on the server : cd /srv/openstreetmap-website/ rails server --binding=0.0.0.0

then back to the PC : in Chrome : http://localhost:3000/

And I got the result that you can see above.

(06 Apr '15, 08:09) Titi9876

Hello, i have the same problem , that author have. Can anyone help with this ? I've installed fresh Rails Port, via clonnig repo many times, but always there were problem at test:db step. Probably the problem in sass.

(02 Sep '17, 00:45) Нурик Нурметов

Pls do not ask questions in answers.

(02 Sep '17, 08:55) SimonPoole ♦

I suppose that you've missed some steps, because probably style sheets were not pre-processed.

(06 Sep '17, 19:23) Sergey Karavay

I have a similar problem with ltr/common.scss. I've figured out that it's caused by symlinks in VirtualBox shared folders. You can avoid it by not using VirtualBox shared folders. If I figure out how to make everything work without shared folders, I'll post an answer.

(09 Nov '18, 02:28) Krubo
showing 5 of 6 show 1 more comments

I had a similar problem, although my error message was different. I'm using Vagrant on Windows 10, running git from Cygwin. My precise error message was: Error: Invalid UTF-8 sequence on line 1 of app/assets/stylesheets/ltr/common.scss. However, I think the problem is similar because it mentions the same file as your error:

/srv/openstreetmap-website/app/assets/stylesheets/ltr/common.scss

It turns out this file is a symlink, and it looks like VirtualBox is less than fully graceful in handling symlinks within folders that are shared between the guest and host. I haven't found a way to fix the issue directly, but I was able to work around it by cloning OSM into a non-shared folder on the guest machine, as follows:

$ vagrant ssh
vagrant@ubuntu-bionic:~$ cd /srv
vagrant@ubuntu-bionic:/srv$ sudo mkdir osmw2
vagrant@ubuntu-bionic:/srv$ sudo chown vagrant:vagrant osmw2
vagrant@ubuntu-bionic:/srv$ cd osmw2
vagrant@ubuntu-bionic:/srv/osmw2$ git clone --depth=1 https://github.com/openstreetmap/openstreetmap-website.git
vagrant@ubuntu-bionic:/srv/osmw2$ cd openstreetmap-website
vagrant@ubuntu-bionic:/srv/osmw2/openstreetmap-website$ cp /srv/openstreetmap-website/config/application.yml config/
vagrant@ubuntu-bionic:/srv/osmw2/openstreetmap-website$ cp /srv/openstreetmap-website/config/database.yml config/
vagrant@ubuntu-bionic:/srv/osmw2/openstreetmap-website$ rails server --binding=0.0.0.0

Then open your web browser and go to localhost:3000. (Note, this workaround doesn't let you share the code with your host machine, so if you want to edit code you have to do it on the guest VM, using command-line tools like vi and git.)

permanent link

answered 11 Nov '18, 01:31

Krubo's gravatar image

Krubo
116238
accept rate: 0%

edited 11 Nov '18, 02:43

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×61
×1

question asked: 05 Apr '15, 11:57

question was seen: 5,308 times

last updated: 11 Nov '18, 02:43

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum