I am working on macOS Catalina versions 10.15.7.
I have a problem with Ruby(Peng Lv) extension for VScode. It seems it does work - no syntax highlighting except for the 'do', 'end', symbols ':', strings and comments.
Here is the list of all my extension:
endwise 1.4.2
Ruby(Peng Lv) 0,28,1
Ruby Solargraph 0,21,1
VSCode Ruby 0.28.0
vscodhe-icons 11.1.0
and my settings.json looks like this:
{
"workbench.colorTheme": "Visual Studio Dark",
"editor.tabSize": 2,
"emmet.triggerExpansionOnTab": true,
"window.zoomLevel": 0,
"explorer.compactFolders": false,
"workbench.iconTheme": "vscode-icons",
"ruby.useBundler": true, // use the internal language server (see below)
"files.autoSave": "afterDelay",
"ruby.format": true
}
I have tried installing many different version od Ruby(Peng Lv) extensions but nothing changed.I really don't know what is the issue. Do you know what should I do to resolve this annoying problem?
In case someone came across that problem, all you have to do is change the VScode theme from Dark to Dark+.
Related
We tried updating react-scripts from 4.0.3 to 5.0.0 with react-data-export 0.6.0 and xlsx 0.17.2, and when we try to build it fails with the error Module not found: Error: Can't resolve 'fs' in react-data-export\node_modules\tempa-xlsx
What fix needs to be applied to maintain react-scripts version 5.0.0?
I am using react-scripts and not webpack. Thanks!
Try adding this in node_modules\react-data-export\node_modules\tempa-xlsx\package.json
"browser": {
"fs": false,
"path": false,
"os": false
}
Worked with me.
Edit:
I just found out that I can't create Excel files anymore. After some research, it seems that 'fs' (which is used to interact with file system) was removed from react-scripts 5. So the only solution is to either use react-scripts 4.0.3, or use another Excel library.
Although adding "fs":false is a temporary fix, you might not be able to export excel files altogether. This package is not being maintained anymore. I would suggest go for react-export-excel
How to make autocompletion as in goland?
For VSC.
How do I need.
No good.
I have installed packages:
gocode
godef
golint
go-find-references
go-outline
goreturns
gorename
gopkgs
go-symbols
And configured settings.json:
{
"go.toolsGopath": "/home/user/go",
"go.gopath": "/home/user/go",
"go.goroot": "/snap/go/3739",
"go.buildOnSave": true,
"go.lintOnSave": true,
"go.vetOnSave": true,
"go.buildFlags": [],
"go.lintFlags": [],
"go.vetFlags": [],
"go.useCodeSnippetsOnFunctionSuggest": false,
"go.formatOnSave": false,
"go.formatTool": "goreturns"
}
Within VS Code go to the extensions tab and search for "Go". There will be one listed created by Microsoft which provides IntelliSense. Install this extension and restart VS Code, you should have the functionality you are looking for.
Note: you will need to be in a .go file for the IntelliSense to kick in.
I have a piece of code that draws text on top of an image in my Rails app and since short while ago, probably having to to with upgrading to OS X Yosemite, it's having an issue with reading fonts on my local machine (production server is working fine).
I can reduce it to this example:
require 'rvg/rvg'
font = '"/Users/xxxxxxxx/xxxx/app/assets/fonts/PTSans-Regular.ttf"'
rvg = Magick::RVG.new(100,100) do |canvas|
canvas.text(0, 0, 'my text').styles(font: font)
end
rvg.draw
I get this error
Magick::ImageMagickError: unable to read font `"/Users/xxxxxxxx/xxxx/app/assets/fonts/PTSans-Regular.ttf"' # error/annotate.c/RenderFreetype/1153: `(null)'
from /Users/xxxxxxxx/.rvm/gems/ruby-2.0.0-p353#xxxxxxxx/gems/rmagick-2.13.2/lib/rvg/misc.rb:322:in `get_type_metrics'
I tried reinstalling imagemagick and the rmagick gem, also with these flags:
brew install imagemagick --disable-openmp --build-from-source
Also, if I change
font = "/Users/xxxxxx/xxxxx/app/assets/fonts/PTSans-Regular.ttf"
thinking that the extra quotes could get in the way, then I get
Magick::ImageMagickError: non-conforming drawing primitive definition `Users/xxxxx/xxxx/app/assets/fonts/PTSans-Regular.ttf' # error/draw.c/DrawImage/3170
from /Users/xxxxxxx/.rvm/gems/ruby-2.0.0-p353#xxxx/gems/rmagick-2.13.2/lib/rvg/misc.rb:546:in `draw'
I have also tried to install the latest version of XQuartz from http://xquartz.macosforge.org/landing/
Strangely enough, this fixed it:
brew install gs
The error got me confused because it didn't say anything about ghostscript, however, it worked according to https://stackoverflow.com/a/13936374/322253
$ sass -v
Sass 3.4.2 (Selective Steve)
PHPStorm 7.1.3
Open a new .scss file and add:
$objects: (vegetable: carrot, mineral: salt, animal: chicken);
On each colon within the map PHPStorm gives me a red squiggly error stating "a term expected".
Why is PHPStorm giving me a “a term expected” error on a SASS map?
Because this feature was introduced in SASS v3.3 (released on 7th of March 2014) .. and PhpStorm v7.1.3 (at the end February 2014) does not support that version.
Such support was added later and will be available in upcoming PhpStorm v8. You can try latest public EAP build if you wish so now: http://eap.jetbrains.com/phpstorm
As you may have known that I switched from ubuntu to windows from my previous questions. I was working on Zend Framework on ubuntu and now working on same project in windows. Because of this switching I am facing some problems in windows which was not occurred in ubuntu.
Now I have the following error in firebug console when I go to login page:
<b>Fatal error</b>: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in <b>C:\wamp\www\vcred\library\Zend\Db\Adapter\Pdo\Mysql.php</b> on line <b>93</b><br />
Do you people know that what type of error is this and what is the solution?
I have the following configuration for database.
resources.db.adapter = "Pdo_Mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "test"
resources.db.params.charset = "utf8"
Thanks
I just had the same error with PHP 5.2.6, and all I had to do is to open php.ini (e.g. on Windows: C:\Windows\php.ini, or on Ubuntu: /etc/php5/apache2/php.ini or sg. like this) in a text editor, and remove the semicolon from the following line:
;extension=php_pdo_mysql.dll
So as a result it would look like this in php.ini:
extension=php_pdo_mysql.dll
That solved my problem.
This looks related to this bug on PHP's bugtracker : Bug #47224 MYSQL_ATTR_INIT_COMMAND is no longer available
It seems it's been fixed in SVN -- but maybe not in the version of PHP you are using ?
Quoting one of the comments :
[2009-07-02 06:43 UTC] mg at artigo
dot pl A temporary solution is to
use INT value (1002) instead of
constant.
This might be a temporary solution, until you install a new version of PHP, in which the bug is fixed ?
Looks like a Windows bug in PHP 5.3 that was fixed in SVN a while ago. You might want to try updating to the latest PHP release to see if the issue still exists.
I got the same error, on debian6, when I had not yet installed php-mysql so, I simply installed this, like this
apt-get install php5-mysql
/etc/init.d/apache2 restart
I just add it here, in case other have same problem, to save them them a few minutes of research.