error was received while processing Paperclip::Errors::CommandNotFoundError - ruby-on-rails-4

I'm sharing the solution I didn't find in any posts in the hopes of saving someone else some time and trouble.
After ImageMagick is correctly installed:
$ which convert
$ /opt/local/bin/convert
I added Paperclip.options[:command_path] = "/opt/local/bin/" to routes.rb rather than development.rb as recommended in the paperclip documentation.
If there's any reason not to include Paperclip.options in routes.rb, I'd like to know!

Actually, paperclip's documentation recommends to set Paperclip.options[:command_path] = "/opt/local/bin/" in the environment config file (development.rb or production.rb for example).

Related

Installation of Spatialite with Django on windows 10

I am struggling to find out how to install spatialite for geodjango on windows but I don't know what I am doing wrong. I follow the instructions as per the django page https://docs.djangoproject.com/en/4.0/ref/contrib/gis/install/spatialite/ but the tutorial doesn't say what to do after getting the binarys of spatialite
I have tried to put them everywhere but every time I get the same error:
Exception Value:
Unable to load the SpatiaLite library extension as specified in your SPATIALITE_LIBRARY_PATH setting
I tried to put the mod_spatialite.dll file everywhere and try to set to SPATIALITE_LIBRARY_PATH but it seems I can't get the solution
Any suggestions would be appriciated
Thanks
Extracting the binary into Python installation folder eg: C:\Users\huy\AppData\Local\Programs\Python\Python39.
Then add SPATIALITE_LIBRARY_PATH = "mod_spatialite". This works for me.

How can I set scip options using pyomo?

I am trying to set parameter values for solving a pyomo model using SCIP. When I run
opt = SolverFactory('scipampl')
solver_message = opt.solve(model, tee=True)
SCIP solves the model mich means that the setup of scipampl has worked. Yet I'm not sure what's the right way to add options. I found that this was adressed here before and seems to have been integrated in this git commit.
I have tried setting options via
opt.options['limits/time'] = 100
which results in the error
.../scipoptsuite-6.0.2/scip/src/scip/paramset.c:2569] ERROR: cannot open file <limits/time=100> for reading
limits/time=100: No such file or directory
Any suggestions how to set SCIP options properly in pyomo?
Edit:
While I would still be interested in how passing SCIP-options via pyomo is intended, I found a workaround which worked for me.
I set options via the SCIP interactive shell and saved the file (also via shell) as scip.set at the place from which the python script is run.

open tensorboard in Google Chrome shows blank

My tensorflow is installed on ubuntu 16.04 and also generates log files, but when running tensorboard there is nothing on Google Chrome. There was no error on the command line.
This error only appears on Google Chrome. What can I do to display it properly?
This file is deprecated. Please use
iron-flex-layout/iron-flex-layout-classes.html, and one of the
specific dom-modules instead
thinkpad/:39507 This file is deprecated. Please use
iron-flex-layout/iron-flex-layout-classes.html, and one of the
specific dom-modules instead
thinkpad/:157058 Uncaught TypeError: Object.values is not a function
It's possible you're using Chrome version 49 or earlier: https://caniuse.com/#search=object.value
I mailed out tensorflow/tensorboard#1089 to solve this problem. Please note there might be other things in our codebase that are incompatible with old browsers. I'd like to improve this situation. Please email jart#google.com if you encounter similar problems.
It especially helps if you can send a screenshot of the code in question. For example, if Chrome says JavaScript broke on line 48238, you can run wget -O index.html http://localhost:6006/ and nano +48238 index.html so you can take a screenshot of the code in question. (Note: This will get easier in the future.)

changing default download location in chrome using Pytest_mozwebqa

Can anyone please help how do i change the chrome settings in selenium using pytest to download files to a desired location.
what should i add to the below command in run configurations of eclipse to change the download path
--baseurl='http://example.com'--driver=chrome
In Python itself, it would be:
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_experimental_option("prefs", {"download.default_directory": "some/path", "download.directory_upgrade": true})
driver = webdriver.Chrome(executable_path="the/path/to/the/driver.exe", chrome_options=chromeOptions)
Related: https://bugs.chromium.org/p/chromedriver/issues/detail?id=330
If I understand correctly how this "Pytest_mozwebqa" thingy works, you could try adding this command line:
--chromeopts='{"prefs":{"download.default_directory":"some/path","download.directory_upgrade":true}}'

"pacman -Syu" not working: invalid PGP key

I'm trying to do a full system upgrade using pacman -Syu. It says:
:: File /var/cache/pacman/pkg/turbulence-0.3.5-1-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
Is there a way to fix this?
There are tons of topics out there that say you should edit the pacman.config file and remove the PGP key checks entirely but it's not a good idea.
simply run this command and wait for refreshing your keys by downloading them from the servers:
$ sudo pacman-key --refresh-keys
and then proceed with you full system upgrade sudo pacman -Syu
You may also be interested in running pacman-key --populate if the keys are massively out of date or if the other given answer of pacman-key --refresh-keys does not work in practice.
I ran into this problem when using a (ridiculously) outdated Arch version.
In case anyone else runs into this while using Docker, you can try downloading a fresh image (docker pull archlinux) in lieu of directly refreshing the keys.
I think this is useful because the sibling answers did not work for me.