Can’t find the ‘libpq-fe.h header when trying to install pg gem

It looks like in Ubuntu that header is part of the libpq-dev package (at least in the following Ubuntu versions: 11.04 (Natty Narwhal), 10.04 (Lucid Lynx), 11.10 (Oneiric Ocelot), 12.04 (Precise Pangolin), 14.04 (Trusty Tahr) and 18.04 (Bionic Beaver)): So try installing libpq-dev or its equivalent for your OS: For Ubuntu/Debian systems: sudo apt-get install libpq-dev On Red Hat Linux (RHEL) systems: yum install postgresql-devel For Mac Homebrew: brew install postgresql For Mac MacPorts PostgreSQL: gem install pg — –with-pg-config=/opt/local/lib/postgresql[version number]/bin/pg_config … Read more

What is the difference between Rails.cache.clear and rake tmp:cache:clear?

The rake task only clears out files that are stored on the filesystem in “#{Rails.root}/tmp/cache”. Here’s the code for that task. https://github.com/rails/rails/blob/ef5d85709d346e55827e88f53430a2cbe1e5fb9e/railties/lib/rails/tasks/tmp.rake#L25-L30 Rails.cache.clear will do different things depending on your apps setting for config.cache_store. http://guides.rubyonrails.org/caching_with_rails.html#cache-stores If you are using config.cache_store = :file_store then Rails.cache.clear will be functionally identical to rake tmp:cache:clear. However, if you’re using some other cache_store, like :memory_store or :mem_cache_store, then only Rails.cache.clear will clear your app cache. … Read more