This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You’re running the service from your user manager (--user), and apparently your logind doesn’t have lingering enabled for you. As a result, your session (including any services started inside it) is closed down whenever you log out. | |
To change this behaviour, you need to enable lingering: | |
`sudo loginctl enable-linger $USER` | |
This will start a user manager for you at boot and allow your services to survive your login sessions. | |
A better approach for a system service such as this is really to run it as its own user, managed by the main systemd instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache | |
sudo apt-get install -y apache2 | |
# Install our PGP key and add HTTPS support for APT | |
sudo apt-get install -y dirmngr gnupg | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7 | |
sudo apt-get install -y apt-transport-https ca-certificates | |
# Install Passenger + Apache module | |
sudo apt-get install -y libapache2-mod-passenger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install [email protected] | |
gem install libv8 -v '3.16.14.13' -- --with-system-v8 | |
gem install therubyracer -- --with-v8-dir=/usr/local/opt/[email protected] | |
bundle install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I worked for a client where I have to generate an image version to be display in frontend (old code use original image which size ~6MBx40images for a gallery). I added a new image version in ImageUploader class then run a background job to reprocess large version. The website keep crashing every 20mn, after the whole day debugging the job, debugging sidekiq, trying uncached query, result still the same. | |
After a whole day I found the issue, it caused by RMagick. I migrate to MiniMagick which is a replacement for RMagick. | |
https://github.com/minimagick/minimagick | |
"I was using RMagick and loving it, but it was eating up huge amounts of memory. Even a simple script would use over 100MB of RAM. On my local machine this wasn't a problem, but on my hosting server the ruby apps would crash because of their 100MB memory limit." | |
So choose a gem carefully! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGA git:(develop) gem install rmagick -v '2.16.0' | |
Building native extensions. This could take a while... | |
ERROR: Error installing rmagick: | |
ERROR: Failed to build gem native extension. | |
current directory: /Users/vibolteav/.rvm/gems/ruby-2.3.4@caregiverasia/gems/rmagick-2.16.0/ext/RMagick | |
/Users/vibolteav/.rvm/rubies/ruby-2.3.4/bin/ruby -r ./siteconf20180109-46784-15zo51o.rb extconf.rb | |
checking for gcc... yes | |
checking for Magick-config... yes | |
checking for outdated ImageMagick version (<= 6.4.9)... no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An error occurred while installing nokogiri (1.8.1), and Bundler cannot continue. | |
Make sure that `gem install nokogiri -v '1.8.1'` succeeds before bundling. | |
In Gemfile: | |
activeadmin_settings_cached was resolved to 2.0.1, which depends on | |
rails-settings-cached was resolved to 0.5.6, which depends on | |
rails was resolved to 5.0.6, which depends on | |
actioncable was resolved to 5.0.6, which depends on | |
actionpack was resolved to 5.0.6, which depends on | |
actionview was resolved to 5.0.6, which depends on |