Comments (14)
In nginx you can use this
location ~* ^.+\.(js|css|jpg|jpeg|gif|png|svg|ico||mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|flv|swf|avi|mp4)$ {
root /var/.../current/public;
access_log off;
expires 30d;
add_header Cache-Control private;
error_page 404 = @fallback;
}
location @fallback {
proxy_pass http://monkey_prod_unicorn;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
from mongodb_logger.
why not use the standard assets folder setup so assets compile can grab all mongodb_logger assets and include them in the app automatically?
from mongodb_logger.
maybe, but this folder should be with fix name. Is it good for you?
from mongodb_logger.
Usually when I use a rails engine, it automatically includes assets within
it in my app's assets folder. So, I thought this is best way to include
assets. However, you might have other concerns which I don't know.
On Jun 5, 2012, at 6:14 PM, Alexey <
[email protected]>
wrote:
maybe, but this folder should be with fix name. Is it good for you?
Reply to this email directly or view it on GitHub:
#36 (comment)
from mongodb_logger.
ok, I will looking on solutions.
from mongodb_logger.
Hello, aja. Please, try new version with assets pipeline support. Add into Gemfile:
gem 'mongodb_logger', :git => 'git://github.com/le0pard/mongodb_logger.git', :branch => 'development'
And run "bundle". If all will be good - I will release new version.
from mongodb_logger.
Rails.application.config.assets.paths now shows the engine's assets paths correctly. However, now the assets aren't loaded correctly in development nor production. I see the page is linking to "mongodb_logger-125e8e72b7393e4a4e3e3d3211a6cb27.js", as an example, in development which doesn't exist and in production which is not being generated. I wonder how is it working for you in all environments? maybe I'm doing something incorrectly. Also, there might be a conflict in css/js files as I have jquery in my app and have layout.css.scss and so on.
from mongodb_logger.
http://demo-mongodb-logger.catware.org - this is example working on heroku with assets pipeline. Also on my local mashine in dev mode all js/css loaded corectly. This files not generated in public directory, its proxy by sprokets gem.
from mongodb_logger.
Ok, lets try another solution. Please, add this task on deploy (before restart):
bundle exec rake mongodb_logger:assets:compile[public/assets]
from mongodb_logger.
Or event better. Add this to config/deploy.rb:
require 'mongodb_logger/capistrano'
from mongodb_logger.
I tried the latest and looks like you are getter closer. Though, even in development now it doesn't work I get the following error:
Started GET "/assets/mongodb_logger-2d8ad697f60c84620718293ae4c34951.css" for 127.0.0.1 at 2012-06-10 21:49:13 +0300
Error compiling asset mongodb_logger.css:
Sass::SyntaxError: Undefined mixin 'border-radius'
border-radius is a sass mixin that I defined in my application.css and is used in layout.css. When I define the mixin in layout it works but complain about another mixin called box-shadow. So, it seems like there is a conflict in loading libraries. I'm using twitter-bootstrap also. This is with regard to development env which used to work before.
As for the new rake task when I execute:
bundle exec rake mongodb_logger:assets:compile[public/assets]
I get:
No such file or directory - public/assets/mongodb_logger-125e8e72b7393e4a4e3e3d3211a6cb27.js+
from mongodb_logger.
Strange something in your app. Why sass try to work with files ".css"? This is simple css files, nothing more. To execute rake task be sure, what folder "public/assets" exists in your project.
P.S. Here one of css files:
https://github.com/le0pard/mongodb_logger/blob/master/app/assets/stylesheets/library.css.erb
Just css. Added erb to convert images urls in correct way. Please check your application. In "default" rails 3 app sass only work with files ".sass".
from mongodb_logger.
Hello, @aja. Do you have any progress about your problem? Because I coudn't reproduce your problems.
from mongodb_logger.
No, you can close the issue though. Maybe it conflicts with a library. I
will notify you if I find the problem.
On Jun 20, 2012, at 11:45 PM, Alexey <
[email protected]>
wrote:
Hello, @aja. Do you have any progress about your problem? Because I coudn't
reproduce your problems.
Reply to this email directly or view it on GitHub:
#36 (comment)
from mongodb_logger.
Related Issues (20)
- Messages node is empty HOT 5
- Can't add metadata to logs! HOT 8
- Having trouble with setup on Heroku HOT 5
- Log messages (debug/info/warn etc.) don't show up HOT 8
- You do not use capped collection for logs HOT 3
- How to log message from Rails Console or Resque Jobs HOT 2
- How catch logs from some Rails::Engine's? HOT 16
- rake task to recreate capped collection when size is changed HOT 7
- Mongodb logger exception on server HOT 2
- Routing Errors not appearing in the logs HOT 4
- How to catch MOPED logs? HOT 3
- Not working with moped 2.0 beta/beta2 HOT 3
- Production logs not created when mongodb_logger can't connect HOT 10
- Uninitialized constant BSON HOT 8
- I Have error in Production: HOT 8
- Is is possible to get or record response status code? HOT 2
- Filter what to log to MongoDB HOT 1
- Mongoid 5.1 support HOT 1
- Rails 5 support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb_logger.