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

Problem with deployment #336

Closed
reckoncraft opened this issue Apr 18, 2014 · 6 comments
Closed

Problem with deployment #336

reckoncraft opened this issue Apr 18, 2014 · 6 comments

Comments

@reckoncraft
Copy link

Hello, I'm trying to deploy kandan on my own private server and I got this error:

Sass::SyntaxError at /users/sign_in
".main-area .header" failed to @extend "%header".
The selector "%header" was not found.
Use "@extend %header !optional" if the extend should be able to fail.

  (in /var/www/kandan/app/assets/stylesheets/application.css.sass)

My Ruby version is 2.1.1 and I'm using MySQL for the database instead of postgres. I'm also using proxy-pass on an nginx server although directly going to localhost:3000 still gives out the same error.

Thanks

@scouttyg
Copy link
Member

Did you already pull in the latest changes from master? (Merged in 2 pull requests last night).

In #334, I hit into the same issue. The solution was to add gem 'sass', '3.2.13' to your gemfile and then run bundle update 'sass', until the Sass/Sprockets guys figure out what's going on.

@reckoncraft
Copy link
Author

Thanks, that fixed the problem.

But now I'm having the same issue as #327 in which I need to refresh to see new messages.

@reckoncraft
Copy link
Author

Here's what the console says about the error. It seems that faye is getting a 502 for some reason.

Failed to load resource: the server responded with a status of 502 (Bad Gateway) 
Comm link to Cybertron is down! faye.js?body=1:20
Failed to load resource: the server responded with a status of 502 (Bad Gateway)
EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.
Comm link is up! faye.js?body=1:23
POST http://chat.detune.org/remote/faye 502 (Bad Gateway) faye.js:2
Faye.Transport.XHR.Faye.extend.Faye.Class.request faye.js:2
Faye.Transport.Faye.extend.Faye.Class.flush faye.js:1
(anonymous function) faye.js:1
Comm link to Cybertron is down! faye.js?body=1:20
POST http://chat.detune.org/remote/faye 502 (Bad Gateway) faye.js:2
Comm link is up! faye.js?body=1:23
POST http://chat.detune.org/remote/faye 502 (Bad Gateway) faye.js:2
Comm link to Cybertron is down! faye.js?body=1:20
Comm link is up! 

@scouttyg
Copy link
Member

I just tried to access your chat app at http://chat.detune.org/ and I get a 502 bad gateway (like the one mentioned in your logs) -- it sounds like your server configuration might be buggy. Do you have an external url to access the chat?

@reckoncraft
Copy link
Author

Ah, I see... the chat works when I access it from http://detune.org:3000 . It must be a problem with my nginx configuration. Currently it looks like this:

server {
listen       80;
server_name  chat.detune.org;

location / {
    proxy_pass http://localhost:3000;
}
}

I suppose the proxy pass is what makes faye to keep getting the 502. However, is there a way to make it so that it would work from http://chat.detune.org ?

@scouttyg
Copy link
Member

Unfortunately, it's beyond the scope of what I can probably help out with -- I'm not very familiar with configuring nginx, plus it could be a permissions issue.

That being said, from this stack overflow I found something that could be close to what you need:

server {
    listen 80;
    server_name chat.detune.org;
    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_redirect off;
        proxy_pass http://localhost:3000;
    }
}

If that doesn't work, I'd recommend asking the nginx support groups. If you do figure out what went wrong, let us know and we would be glad to update the documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants