Coder Social home page Coder Social logo

refile-postgres's People

Contributors

krists avatar tranquility avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

refile-postgres's Issues

Assets precompile issue with initializer

Hi (again ;)),

I did discover an issue with 'assets:precompile' (Rails 4).
Normaly Rails 4 does not need a db connection for assets:precompile.
But with refile-postgres setup within the initializer a connection is needed.

This is bad in my case because I don't have a route from my asset hosts to my db servers.

Proc initializer become more and more charming ;)

regards
dieter

Undefined method `verify_uploadable' for Refile:Module

Hey @krists
Rails beginner here...

I'm getting an undefined method error on my controller#create (default from scaffold) method.

form
<div class="field">
    <%= f.label :file %><br>
    <%= f.attachment_field :file %><br>
</div>
require "refile"
Refile.configure do |config|
  config.store = Refile::Postgres::Backend.new(ActiveRecord::Base.connection.raw_connection)
end
"file"=>#<ActionDispatch::Http::UploadedFile:0x007f9a1925d1a8 @tempfile=#<Tempfile:/var/folders/kr/cpw88nhx6clgd4hjzkqp4rg80000gn/T/RackMultipart20150119-88383-1caehtl.xml>,
 @original_filename="buildInformation_SIGAA_3.7.0_3.7.35.ufopa.xml",
 @content_type="text/xml",
 @headers="Content-Disposition: form-data; name=\"build_information_file[file]\"; filename=\"buildInformation_SIGAA_3.7.0_3.7.35.ufopa.xml\"\r\nContent-Type: text/xml\r\n">},

It's runs just fine when I set the backend as FileSystem, so I'm guessing that is the Postgres backend.
Any ideas?

Rails 4.2.0, Refile 0.5.3, Postgres backend, Ruby 2.2.0

Thanks

Nginx as caching proxy

Serving the content directly through the Rails-App is expensive. So I configured my
asset host (nginx) as an caching proxy. Maybe someone can use it too, so I like to share it.

I don't know where to put it. Maybe as an example would it be good.

http {
 ...
proxy_cache_path /.../shared/public/uploads levels=1:2 keys_zone=my_app_production:250m inactive=6000m;

server {
  server_name assets.my-app.example.com
   proxy_cache my_app_production;
   location  ^~ /attachments/ {

gzip_static on;
    expires max;
    add_header Cache-Control public;
    add_header X-Proxy-Cache $upstream_cache_status;

    proxy_ignore_headers Set-Cookie Cache-Control Expires;
    proxy_cache_key $host$uri$is_args$args;
    proxy_hide_header Set-Cookie;
    proxy_hide_header Cache-Control;
    proxy_hide_header Expires;
    proxy_cache_valid 200 600m;

    proxy_store_access user:rw group:rw all:r;
    proxy_store        on;

    proxy_cache_bypass        $http_secret_header;

    proxy_pass http://www.my-app.example.com ;

   }

Refile dependency issue

HI there,

Running into this error:

Bundler could not find compatible versions for gem "refile":
In Gemfile:
refile

refile-postgres was resolved to 1.4.0, which depends on
  refile (~> 0.6.2)

Could not find gem 'refile (~> 0.6.2)', which is required by gem 'refile-postgres', in any of the relevant sources:
https://github.com/refile/refile.git (at master@e690bf5)

How can I resolve this issue?

Unicorn closing postgres connection before fork

Hi,

I tested refile postgres with unicorn. There are some issues with the connection. When
used with preload_app true DB connections are closed before fork and so this gem doesn't work any more. Is there a way to reinject a new connection?

regards
Dieter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.