joelmoss / strano

Capistrano and Github sittin' in a tree...
http://developwithstyle.com
MIT License
578 stars 70 forks source link

Organizations link broken in new project creation #3

Closed minter closed 12 years ago

minter commented 12 years ago

Installed on an Ubuntu 11.10 system running Ruby 1.9.2p290, running under Passenger/nginx.

First, I had to manually run rake assets:precompile before the app would run, complaining about ActionView::Template::Error (application.css isn't precompiled):

Once I did that, the application would start (though the layout looks a little weird, making me wonder if there's some sort of asset pipeline issue).

Screenshot: http://c248724.r24.cf1.rackcdn.com/strano1.png

The repositories I'm trying to set up for strano deployment are all under an organization, not my personal Github login. However, clicking on the Organizations link is a null-op, just taking me back to the # URL marker, and not firing any Javascript that I'm seeing.

Any ideas?

joelmoss commented 12 years ago

Think you need to fix the assets first, then you should find that all works. If you are running your app in production, run

rake RAILS_ENV=production assets:precompile
minter commented 12 years ago

I did do the rake assets:precompile in production (the app wouldn't start at all before doing that).

After the precompile, the app would start but (as seen in the screenshot), formatting was a little off, and the organizations link was nonfunctional.

joelmoss commented 12 years ago

This is an issue with Rails and its asset pipeline, and how you are running the app. Sorry, but I'm not quite sure how else I can help you. Are you able to run it in development mode?

minter commented 12 years ago

I can try running it in development mode, but you haven't run across anything similar? I'm using the same set of gems as provided in the Gemfile, so I'm kind of surprised that there's some sort of Rails incompatibility at work.

joelmoss commented 12 years ago

Its not anything about an incompatibility with Rails.

No I've not come across it at all. But its definately an issue with the assets. What I would do is check the render HTML source and the JS and CSS files that are included within it, and ensure that they load. Also check your logs, as they should give you some info.

minter commented 12 years ago

Yes, the same thing is happening in development mode. Looking through development.log, I don't see any signs of assets not being loaded - requests are showing up as being loaded properly:

Started GET "/assets/libs/url_vars.js?body=1" for 99.182.43.161 at 2012-02-07 01:07:19 +0000
Served asset /libs/url_vars.js - 200 OK (0ms)
Started GET "/assets/common/bootstrap.js?body=1" for 99.182.43.161 at 2012-02-07 01:07:19 +0000
Served asset /common/bootstrap.js - 200 OK (0ms)
Started GET "/assets/app/jobs.js?body=1" for 99.182.43.161 at 2012-02-07 01:07:19 +0000

There are also no JavaScript errors showing up in Chrome's JavaScript console.

So just to review:

I was able to get it to run successfully on my MacBook. The only difference is that the MacBook is running Ruby 1.9.3, and the remote server is running Ruby 1.9.2. Do you think that could be the problem?

joelmoss commented 12 years ago

Its only been tested in 1.9.3, so I will have to check it out on 1.9.2

attilagyorffy commented 12 years ago

FYI: I am running on Ruby 1.9.3-p125 on my Ubuntu 11.10 and the project works like a charm. I would be surprised if turns out Rails' asset pipeline is broken on 1.9.2.

What I would do is: RAILS_ENV=production rake assets:clean RAILS_ENV=production rake assets:precompile touch tmp/restart.txt (If you are using Passenger for deployments)

Hope these would help...