bundle install does not run within RubyMine - rubymine

Using RubyMine 2017.3.1 on Mac OSX 10.13.3, when I choose "Tools -> Bundler -> install" and set optional arguments "--path vendor/bundle", the result is
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) install --path vendor/bundle
-e:1:in `load': cannot load such file -- install (LoadError)
from -e:1:in `<main>'
The command "bundle install --path vendor/bundle" works when executed on the command line.
It also works when defined under "External Tools" as a command-line command.
I've been unable to find a way to correct the generated command line in RubyMine, or to correct the problem in some other way.
How can I set up RubyMine to execute bundler correctly?

I was able to solve this same issue. The root cause was that I had configured RubyMine (apparently to use /usr/bin/ruby), then subsequently installed rvm to manage my Ruby versions and thence changed/upgraded the Ruby version (associated with the source code directory, by using rvm). I also successfully ran bundle from the command line. Yet, RubyMine was still configured to use the original Ruby binary (/usr/bin/ruby), and so, running bundle from within RubyMine was failing (with the cannot load error).
The fix was to set RubyMine to use the same/newer rvm version of Ruby, by updating the settings in Preferences->Ruby SDK and Gems menu. Refer to the attached screenshot. Now, the RubyMine bundle install command successfully works by running the matching Ruby instance (i.e. ~/.rvm/rubies/ruby-2.3.5/bin/ruby).
RubyMine Preferences->RubySDKandGems screenshot

Related

PhpStorm in Ubuntu can't detect pd_dump executable on PostgreSQL Export

My environment:
Ubuntu 20.04.3 LTS on Windows 10
-> https://www.microsoft.com/store/productId/9NBLGGH4MSV6
PhpStorm 2022.1 Build #PS-221.5080.224, built on April 13, 2022
My Problem:
I'm trying to export a PostgreSQL database inside the Database tab of PhpStorm.
To execute the export I right click the database in the list and click on the "Export with 'pg_dump'" option. This opens the Export window with all the options and command preview:
Inside of the window I get the error message "Path to executable is wrong" even tho the pg_dump file exists at the given path /usr/bin/pg_dump. This stops me from executing the export.
I have tried to manually install pg_dump in another directory and select it in the PhpStorm Export window, but it still won't detect the executable. The executable itself works fine.
The solution to this problem was to do a sudo apt-get install postgresql-client.
Apparently there is a general problem with the pg_dump executable of the "postgresql-client-common" package:
https://askubuntu.com/questions/501091/command-pg-dump-not-found
After installing the postgresql-client package, everything works fine in PhpStorm as well.
The code is pretty simple there: IDE checks that file exists and is executable, then run /path/to/pg_dump --version command and parse output looking for some keywords. Unfortunately there are no logs which can show exact reason, but I guess the issue that IDE can't get access to the file. Most likely due to WSL. The workaround is to install IDE and unpack PG binaries on Windows, then configure port forwarding to make PG server accessible from host OS.

Windows neovim vim-plug error: `git` executable not found

I have already installed vimplug I can open the file but has no effect on Neovim 1
The error says that your plugin manager (vim-plug) isn't able to run the git executable. It needs to do this to fetch the plugins you're trying to load. So install git, make sure you can run it from your PowerShell command line, and you should be set.

ionic install fails on fsevents on Windows

I have tried to install ionic on Windows but installation has failed. What should I do?
I have tried more than 20 times but still I got the same problem.
Here I have attached the screenshot for this
Entered commands:
npm install -g cordova
npm install -g ionic
Note: this one windows server machine
My guess is that the NPM global path has not been added to your windows path.
These are the steps to try:
First verify that the command just installed can run. The output contains the full path to the command installed, just copy and paste it to the command line. In your case it might be something like this %APPDATA%\Roaming\npm\iconic -v
Lets assume that works. That means that the command was successfully installed and will run, now we need to add it to your PATH so you can run it from the command line.
Next, Press Windows key and type "path" and select "Edit environment variables for your account". From here. Add or append the path %APPDATA%\Roaming\npm to your PATH variable, and save the results.
Once it is on your PATH you can run it from any command shell window.
Next, start a new command shell (e.g., Windows+R, cmd, Enter) and then type the command iconic -v. Viola, it should work without requiring the full path to the script.
I'm doing most of this from memory so hopefully it's correct. But if it needs some tweeks, let me know and I'll update the answer.
For completness, this install didn't actually fail. The lines with fsevents are warnings. The fsevents package is only designed to work on Mac Unix so these warnings can be safely ignored.
As Suraj Rao mentioned, also see Nodejs cannot find installed module on Windows?.

Chmod u+x windows cmd

I'm trying to install Scalatra on windows seven and need to change a file to executable...the Scalatra documentation says to do this, which is unix. What is the windows equivalant?
chmod u+x srt
You can simply open the relevant folder with a unix command prompt (I use git bash) and execute the unix commands from there
To get scalatra-sbt going on Windows, either port you own sbt.bat from scalatra-sbt, or install chmod via cygwin.
Assuming you've successfully installed the rest of Conscript and giter8, you can start a project that downloads scalatra-sbt. From there, one can look through the ./sbt source, and port the bash script functionality to your own windows specific script, or install a unix compatibility layer into Windows. If you go down the "windows specific script" route, perhaps the scalatra-sbt would appreciate the project contribution.
The "unix compatibility layer" route will eventually allow you to run ./sbt. chmod is a unix command line function, and is provided in a default package of the tool set cygwin, which provides a complete lunix-like environment. Once inside a cygwin terminal, you can chmod your file, as mentioned in the scalatra-sbt first project.
Diving into the contents of ./sbt from scalatra-sbt, this is actually unix script wrapper around the scala build tool (also referred to, confusingly, as sbt). If while trying to run ./sbt you get strange '\r' errors, install the cygwin package dos2unix, and then run it on the sbt file. If you run into any "which: no curl in..." or "which: no wget in..." errors, go back to the cygwin installer, find those packages such as wget, and then install those programs.
By the way, the last thing the scalatra-sbt script runs is the Scala build tool. The Scala build tool sbt itself has many reported issues with cygwin's default configuration, so you will likely need to do more research. Depending on what issues you're running into on your specific setup, you may need to make changes to the end of the ./sbt script to adjust the parameters used to launch the Scala build tool.

pip install fails with /usr/bin/clang: No such file or directory

I am migrating my dev environment to 10.8, however I am having issues with pip.
Specifically, I'm using a virtualenvs/virtualwrapper but cannot pip install psycopg2, and during the building of the psycopg2._psycopg extension, I get:
unable to execute /usr/bin/clang: No such file or directory
error: command '/usr/bin/clang' failed with exit status 1
Can anyone offer a solution to this?
This probably happens because you did not re-install the Command Line Tools after upgrading.
Usually XCode should be upgraded to the latest version (4.4) (I believe when I updated to 10.8 I also updated a whole bunch of other applications, including XCode). After the update you need to re-install the Command Line Tools. This can now be done via a setting in XCode:
Go to "Preferences -> Downloads" and install "Command Line Tools".
Now you should have no more problems when installing packages that need to be compiled.