tracks 2.4.1 ignoring serve_static_assets: true?

25 views
Skip to first unread message

Hartmut Niemann

unread,
Dec 24, 2019, 12:21:11 PM12/24/19
to trac...@googlegroups.com
Hello!

After Matt's hint about touching tracks/.skip-docker I can run tracks with

    bundle exec rails server -e production

but pictures and stylesheets and so on are missing, although I set

    serve_static_assets: true
 in

    config/site.yml

What am I doing wrong?

In my understanding, I have two choices. I can run tracks with the
little rails web server, then it would have to serve static files as
well, or I set up apache or another big web server, have that serve the
static stuff and run the tracks pages.

Either would be fine with me, but what would I have to do next to set up
one or the other correctly?


Hartmut


Matt Rogers

unread,
Dec 24, 2019, 5:49:37 PM12/24/19
to TracksApp
If you're running the application in production mode, you need to make sure you precompile the assets after each update to the codebase. This is described in the installation guide: https://github.com/TracksApp/tracks/blob/v2.4.1/doc/installation.md#precompile-assets

--
You received this message because you are subscribed to the Google Groups "TracksApp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tracksapp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tracksapp/17682b0c-4347-6c2f-69f5-35976909393b%40gmx.de.

john fritter

unread,
Jan 8, 2020, 9:18:27 PM1/8/20
to TracksApp
Hi, I am having the same issue.  I precompiled the assets exactly as shown in installation.md, but when I load tracks the static assets aren't being served.


On Tuesday, December 24, 2019 at 2:49:37 PM UTC-8, Matt Rogers wrote:
If you're running the application in production mode, you need to make sure you precompile the assets after each update to the codebase. This is described in the installation guide: https://github.com/TracksApp/tracks/blob/v2.4.1/doc/installation.md#precompile-assets

On Tue, Dec 24, 2019 at 11:21 AM Hartmut Niemann <Hartmut...@gmx.de> wrote:
Hello!

After Matt's hint about touching tracks/.skip-docker I can run tracks with

     bundle exec rails server -e production

but pictures and stylesheets and so on are missing, although I set

     serve_static_assets: true
  in

     config/site.yml

What am I doing wrong?

In my understanding, I have two choices. I can run tracks with the
little rails web server, then it would have to serve static files as
well, or I set up apache or another big web server, have that serve the
static stuff and run the tracks pages.

Either would be fine with me, but what would I have to do next to set up
one or the other correctly?


Hartmut


--
You received this message because you are subscribed to the Google Groups "TracksApp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac...@googlegroups.com.

Matt Rogers

unread,
Jan 17, 2020, 8:55:40 AM1/17/20
to trac...@googlegroups.com
What's your setup for running Tracks? Using all the built in stuff?

To unsubscribe from this group and stop receiving emails from it, send an email to tracksapp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tracksapp/8656474b-26cf-4068-a955-f3acd03642b7%40googlegroups.com.

Matt Rogers

unread,
Jan 18, 2020, 9:51:52 AM1/18/20
to TracksApp
I finally had some time to dig into this just now and I'm pretty sure I broke it as part of one of the Rails upgrades. You'll need to set an environment variable in order for the built in Rails server to serve assets. That environment variable is named RAILS_SERVE_STATIC_FILES and as long as it has a value, the built in server will also serve images, css, and javascript.

--
Matt

john fritter

unread,
Jan 18, 2020, 1:22:18 PM1/18/20
to TracksApp
Thanks for getting back to me.  Yeah I was using all the built-in stuff, on crunchbangplusplus linux (Debian 10), using .skip-docker and mysql.  I am now hosting it on heroku though and I got that to work just fine.

hartmut

unread,
Jan 23, 2020, 2:20:10 AM1/23/20
to trac...@googlegroups.com, Matt Rogers
Hi Matt,

thank you, that worked for me!

Viele Grüße
Hartmut
Reply all
Reply to author
Forward
0 new messages