where is bin directory in rails3? - ruby-on-rails-3

I am trying to place the wkhtmltopdf executable in the "bin directory" of my rails project so that it works with heroku, as mentioned here.
dumb question....where is the "bin" folder in the rails project? I placed the executable in root of my executable, however, heroku gives an error saying:
No wkhtmltopdf executable found at /app/bin/wkhtmltopdf-i386
And the following code is used to provide path for wkhtmltopdf
config.wkhtmltopdf = Rails.root.join('bin', 'wkhtmltopdf-i386');

You need to create the bin folder under the app/ folder and add it in there.
mkdir app/bin

Related

Bundle a file in Chromium

I want to add an exe file in Chromium 88 and use c++ to execute it, but after run command
autoninja -C out\Default mini_installer
it showed error about wrong file path of exe file.
how can i put an exe file and bundle it in Chromium ?
To bundle a file in Chromium, you will have to modify src/chrome/installer/mini_installer/chrome.release. Here's how it looks like: https://source.chromium.org/chromium/chromium/src/+/master:chrome/installer/mini_installer/chrome.release;l=1?q=chrome.release&sq=&ss=chromium
Just to make sure it's updatable when you update/upgrade your Chromium version on a user's machine, it should be placed inside VersionDir folder. For example in your case
# Chrome version dir entries, sorted alphabetically.
# Place your file here:
chromium_foo_file.exe: %(VersionDir)s\
For example if 88.0.0.0 is the version of your Chromium then after the installation is complete, this chromium_foo_file.exe will reside in 88.0.0.0 directory. Also place that file in your out\Default build folder before compiling mini_installer, so that it will be included automatically when building it

Pyinstaller executable cannot find QtWebEngineProcess.exe

I'm trying to compile a python program using Pyinstaller that will run PyQt5 QtWebEngineWidgets. Unfortunately there seems to be an issue with the relative path to QtWebEngineProcess.exe within the pyinstaller build.
I installed pyqt5 to be used with Python 2.7 following this method:
https://www.riverbankcomputing.com/pipermail/pyqt/2016-December/038450.html
When I compile this the executable runs fine on my machine but if I move the executable to a computer that does not have Qt installed then it gives me the error 'Could not find QtWebEngineProcess.exe'
Within the dist folder of the pyinstaller build there is a 'PyQt5/Qt/bin' directory that contains QtWebEngineProcess.exe. However I'm not entirely sure why it's not linking to this and still linking to the one in C:\Qt.
I'm certain it's still using the QtWebEngineProcess.exe installed at C:\Qt because if I change that directory name, the built program will fail on the machine I built it on.
At this point I'm trying to edit the paths within the qt.conf file contained in the bin file within the pyinstaller dist directory but I'm not entirely certain that's the answer to this. Ultimately I want a single file executable and by that point I can't edit the contents of the executable.
Thanks!
-Mark

Installing Hive on Windows 8.1 error "Missing Hive Execution Jar: C:\hive\lib/hive-exec-*.jar"

I am following these instructions to install Hive on Windows 8.1
I downloaded Hive tar from [Hive Apache page] (http://www.apache.org/dyn/closer.cgi/hive/) and extracted to folder c:\hive\
I have added a new System Variable set to HIVE_HOME = c:\hive
I have added c:\hive\bin to Path
I already have Hadoop 2.7.5 up and running fine.
When I try to run hive at command line I get following error:
"Missing Hive Execution Jar: C:\hive\lib/hive-exec-*.jar"
Some of the other SO question/answers suggest .jar files are in other folders.
But I can't find any .jar files in the extracted folders.
I don't want to download any .jars as other answers suggest. Shouldn't required .jar file be in the tar file?
I have vague impression that maybe Hadoop has the required .jar files, and there is something I need to do to tell Hive to get those?
Ok so it looks like you do have download a previous version tar file of Hive and extract it to use the .jar files in its /lib folder.
I had originally downloaded apache-hive-2.1.0 and set that up but it didn't have the .jar files in its /lib folder.
So I went to http://apache.mirror.iweb.ca/hive/ and downloaded hive-1.0.1 and which had .jar files in it.
Then copied those in the empty /lib file in apache-hive-2.1.0 installation.
Now Hive is working fine!

Compiling haml from a different directory

I use this to launch my haml compile:
/install-location/haml /myproject/index.haml /myproject/index.html
It runs fine when I'm in the directory with the haml file but when I change to a different directory I get:
Exception on line 3: No such file or directory # rb_sysopen - assets/page/structure/_head.haml
Use --trace for backtrace.
What can I do to fix this?
The path you are trying to read — assets/page/structure/_head.haml is relative to the working directory, not to the source file directory. When you’re in the same directory it works because these two directories are the same.
To be able to run the code from a different directory you need to use absolute paths. You can convert the relative path to an absolute one with File::expand_path, File::dirname and __FILE__:
= Haml::Engine.new(File.read(File.expand_path 'assets/page/structure/_head.haml', File.dirname(__FILE__))).render

Get the closest path that have a config.rb file in file watcher plugin

I recently installed the file watchers plugin, and I must configure it to use compass to compile my sass files.
My current config is:
Program: compass
Arguments: compile
Working dir:
Env vars:
output:
How can I target the closest path to(upward folder tree) config.rb file within scss`s parents folders?
I need it to put in "Working dir:" field
My paths are
scss:
projects/<gitrepo>/<project>/<module-name>/static/<same-module-name>/scss/common/main.scss
css:
projects/<gitrepo>/<project>/<module-name>/static/<same-module-name>/css/common/main.css
config.rb are in:
projects/<gitrepo>/<project>/<module-name>
Module name and folders under scss may vary.
Thanks
I'm using the following solution:
Create a compass project in your Idea project folder by this command in your idea project folder:
compass create --css-dir <your css dir here> --sass-dir <your SASS dir here>
this will create a config.rb in the root of your idea project (this is important). You can learn more about possible options calling compass create --help.
Set up the following setting for SASS/SCSS file watcher
Scope: project files
Program: compass.bat
Arguments: compile $FilePathRelativeToProjectRoot$
Working directory: $ProjectFileDir$
Environment variables: --empty--
Output paths to refresh: --empty--
Please note that ruby bin folder is in my PATH environment variable.