How to configure Compass build with rbenv in Sublime Text 2? - sublimetext2

Trying to build a SASS file under OSX with rbenv and the default Compass build file results in:
/bin/sh: compass: command not found
[Finished in 0.2s with exit code 127]
How to fix?

Add this to your ~/Library/Application Support/Sublime Text 2/Packages/Compass/Compass.sublime-build file:
"osx": {
"path": "/usr/local/bin:/Users/USERNAME/.rbenv/shims:$PATH"
},
You may have to restart Sublime.

Related

Jupyter Notebook print to PDF prints unexpected text

I have been having issue downloading a Jupyter Notebook to PDF. My original error was
Solving "500: Internal Server Error, nbconvert failed: xelatex not found in PATH".
For this I ran from Anaconda Prompt:
conda install -c conda-forge miktex
To solve this I ran from Python Command Prompt:
jupyter nbconvert --to pdf C:\Users\myProfile\myFile.ipynb
I then got an error about Pandoc missing and so to solve this I ran from Anaconda Prompt:
conda install -c conda-forge pandoc
I'm now able to create a pdf but it has one page of gibberish and the actual text is not formatted.
The following in a markdown cell:
<h1>Test Presentation</h1>
<h2>Today's Date</h2>
<h3>Author</h3>
produces:
I also have MikTex and Pandoc installed on my computer and have added their paths to my System Properties Environment Variables. I get no error messages but this gibberish of a PDF.
try the following steps:
from your command prompt install notebook-as-pdf (here are snyk and deps scurity analysis*)
pip install -U notebook-as-pdf
you also need an additional setup for chromium (performs HTML to PDF conversion - snyk, deps)
pyppeteer-install
open the notebook you wish to convernt, click on file -> Download As -> PDF via HTML,
if you prefer you can run it from your command prompt:
jupyter-nbconvert --to PDFviaHTML example.ipynb
note that it has a mid-low score because the last commit was on april, on the other hand it has no dependencies so from that angle you are good

Koala with "sass-json-vars": CLI works, but GUI gets "Cannot load such file sass-json-vars"

I have C:\Program Files (x86)\Koala\ruby\lib\ruby\bin added to the PATH environment variable.
When I install this gem with gem install sass-json-vars, it's installed to C:\Program Files (x86)\Koala\ruby\lib\ruby\gems\2.0.0\gems
When I run the command sass core.scss core.css -r sass-json-vars --trace, it works fine.
But if I open koala-config.json in my project-root and add "customOptions": ["-r sass-json-vars"],, each attempt by the GUI, or the GUI's 'watcher', to compile gives me the error "Cannot load such file -- sass-json-vars".
If I remove the command, and the attempt to import json, the GUI works fine.
The solution was running the following command:
gem install -i "C:\Program Files (x86)\Koala\rubygems" sass-json-vars, or similar syntax for any other gem if anyone should encounter this problem.

The config file (.\ionic.config.json) is not valid JSON format

Every time I run this command: ionic cordova build android --release
I am using cordova -v
7.0.1
I get this error:
The config file (.\ionic.config.json) is not valid JSON format.
Please fix any JSON errors in the file.
Here is my file:
{
"app_id": "12345",
"name": "myApp",
"type": "ionic1"
}
I'm not sure what's going on here.
This command works fine: cordova build android --release
I am not sure what's going on with ionic.
Goto this path- C:/Users/{your_username}/.ionic
find file ionic.config and delete it.
It will be auto-regenerated by the CLI.
It wasn't my ionic config file after all. It was a package.json and bower.json files. They did not have the dependencies correctly in place and the app name was in uppercase. After I fixed my dependencies, I got the command to work.
Run:
npm uninstall -g ionic
Remove .ionic from user home folder
rm -Rf ~/.ionic
Then, reinstall ionic:
npm i -g ionic
just open the config.json file on your ide, delete all the content and ionic serve

How to use Sublime Text 2 build when using rbenv?

I'm using rbenv, and when trying to use the build function inside Sublime Text 2 (Cmd+B) it tries to use the ruby and gems under /Library/Ruby/Gems/
How can I tell ST2 to use my rbenv rubies?
PS: I installed rbenv using boxen.
I figured out this. In order to configure rbenv in ST2 you need to go to Browse Packages, then select the Ruby package, and edit the file Ruby.sublime-build changing the cmd property, like this:
{
"cmd": ["/path/to/your/ruby/shim", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.ruby"
}
In my case, since I'm using boxen, the path was /opt/boxen/rbenv/shims/ruby, but in a standard rbenv installation it should be something like /home/username/.rbenv/shims/ruby in Linux or /Users/username/.rbenv/shims/ruby in OS X.

How do you troubleshoot sublime text 2 (typescript) build errors?

I am using a typescript build from this question along with a build-on-save plugin in sublime text 2 to try and get automatic typescript compiling:
{
"cmd": ["tsc","$file"],
"file_regex": "(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$",
"selector": "source.ts",
"osx": {
"path": "/usr/local/bin:/opt/local/bin"
}
}
It never builds because of the following error. Any tips?
[Errno 2] No such file or directory
[cmd: [u'tsc', u'/Users/dbrito/Sites/Prototypes/totem-tracker/client/views/layout.ts']]
[dir: /Users/dbrito/Sites/Prototypes/totem-tracker/client/views]
[path: /usr/local/bin:/opt/local/bin]
[Finished]
Note: node and npm were installed using homebrew. Typescript was installed with npm -g install typescript. I'm on 10.8.2 with the latest xcode and command line tools installed. The following is in my .profile:
export PATH="/usr/local/bin:/usr/local/sbin:~/node_modules/.bin:/usr/local/share/npm/bin:/usr/local/Library/Aliases:${PATH}"
export NODE_PATH="/usr/local/lib/node_modules:${NODE_PATH}"
My guess would be that either it can't find tsc or your file. can you double check the file shown in your error exists, and then give the output of which tsc in your terminal?
Is it outside your /usr/local/bin? Try removing the osx path setting thing.