Bad Interpreter No Such File or Directory - Docker Sync - windows

When trying to start my Docker container and sync it up using Debian, I consistently encounter this error message after entering in "docker-sync-stack start"...
-bash: /c/RailsInstaller/Ruby2.3.3/bin/docker-sync: C:/RailsInstaller/Ruby2.3.3/bin/ruby.exe: bad interpreter: No such file or directory
I'm fairly sure this is a path issue, but I can't seem to resolve it.

It seems you do not have Ruby installed on your system. That sometimes happens after a system upgrade.
There have been discussions about this
here: https://github.com/EugenMayer/docker-sync/issues/683
here: https://github.com/EugenMayer/docker-sync/issues/679
In general your system cannot find ruby, or your system (with the current ruby version used) cannot find the docker-sync plugin. So you need to reinstall the plugin then.

This happened to me also after updating to Catalina. Fixed by running brew reinstall ruby and brew reinstall docker-sync.

Related

idb-companion: command not found after installing via homebrew

I have installed idb-companion in line with the instructions in their docs, but when I run idb list-targets I get idb: command not found. idb-companion shows up when I brew list. I also tried installing and running the universal .tar.gz folder from their latest release, but got no where. Although I only ran that via the Finder GUI, because I wasn't sure how to execute that from the CLI.
I understand there is some homebrew path I may have to change. I have actually had homebrew issues before and so have usually resorted to installing everything via node where possible. In this case it's not, so I tried the .tar.gz file.
How can I get idb-companion to start working properly?
Most likely it is the case, your python path is not set. You need to set your python path. Faced the same issue was resolved with setting python path.

How to fix bundle install after switching to zsh?

I recently switched from hdd to ssd so i had to reinstall everything from scratch since i wanted a clean ssd and not a clone of the hdd. I am trying to set my website locally but after switching from bash to zsh (using oh my zsh), I am getting the following errors when trying to bundle install (see picture). I have tried everything i found on the internet but nothing seems to fix the errors that pop when trying to manually installing eventmachine and http_parser.
https://i.stack.imgur.com/tEI32.png
Do i have to switch back to bash and reinstall everything? (a.i ruby, yarn etc.)
Thank you.
Fix : Deleting path for ruby gems from .bash_profile and adding it to .zshrc.
export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"

killproc command not found error in Ubuntu 12.04

I have a redmine script in /etc/init.d/ folder which was working fine before I broke the ruby and rails packages link. Then I played with ruby gems and finally fixed the broken links. Then I tried to restart redmine script, But strangely, I got the below error
sudo service redmine stop
Shutting down redmine: /etc/init.d/redmine: line 49: killproc: command not found
user#studio:~$ sudo service redmine start
Starting redmine: /etc/init.d/redmine: /usr/local/bin/bundle: /usr/local/bin/ruby: bad interpreter: No such file or directory
/etc/init.d/redmine: line 35: echo_failure: command not found
killproc is part of init.d, so there isn't a missing package at play here. If the process isn't found, it won't run, as well.
However, the next line is more of a red flag. It sounds like your redmine installation is looking for ruby in the incorrect location. This may also be the source of the killproc error as it looks like redmine is not starting up properly.
You can get some more information by running which ruby and comparing that to the path that redmine is looking in. Reinstalling redmine may also resolve the path issue automatically since it sounds like you did a reinstall of rails earlier. Good luck.
My question has two answers, telemark already given answer for my 2nd problem ( ie, I had broken ruby links ). I solved path issues by uninstalling all ruby, rails and gem packages and reinstalled using apt repository. using rvm, chruby, etc everything failed when I switch between users. So I thought of going with the system ruby installation, relying on apt. Fortunately brightbox comes to the rescue.
https://www.brightbox.com/blog/2015/01/05/ruby-2-2-0-packages-for-ubuntu/
Using brightbox and apt solved my path issues.
Then, /etc/init.d/functions, this was missing. It says, No such file or directory. I searched in google and found this link
http://www.linuxfromscratch.org/lfs/view/6.4/scripts/apds02.html
I just copy pasted to /etc/init/functions and given execute permission
sudo chmod a+x /etc/init.d/functions
Thats it!.
UPDATE:
I forgot to mention one important thing, some functions like log_end_message, log_progress_message, etc are not available in functions file. So it's better to include . /lib/lsb/init-functions file.

Brew update failed on Yosemite

I upgraded my Mac to the new OSX 10.10.
brew update failed with:
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
I tried to follow "Getting a "bad interpreter" error when using brew", but I couldn't get it working.
I do not have Ruby in /usr/local/bin or /user/bin, which may be for same reason which ruby returns nothing.
I have Xcode 5.1 with the command line tools installed. Whenever I start terminal I get:
-bash: /etc/profile.d/sm.sh: No such file or directory
-bash: /etc/profile.d/rvm.sh: No such file or directory
Can anyone suggest possible solutions?
First off upgrade Xcode to 6.1 This is the version that works with Yosemite.
After that make sure you RUN Xcode and Agree to the license ( i know it sucks ).
Note: After Updating My "Oh My Zsh" tools and restarting Xcode it installed some command line tools that I'm pretty sure are important.
There are things to note:
Mac OSX does come with a Ruby preinstalled in /bin/ruby. That is Apple's own installation, used for some of their tools, and basically should be ignored. Updating it could break those tools, and worse, deleting it, will break them. Trying to reinstall it is a pain, so it's better to pretend it isn't there.
We generally recommend using either RVM or rbenv to manage/install any other Ruby version. Those tools are well tested and make it easy to switch back and forth between versions.
rbenv is easier to manage but lacks some of the features of RVM.
Closely follow the RVM installation instructions if you go that way; We see a lot of questions on Stack Overflow caused by people who ignore the directions, or who follow directions on a different site besides RVM's home site. (The RVM authors really do know better than anyone else how to make it work.)
Brew can install Ruby, but switching between versions gets stickier.
It sounds like your PATH variable doesn't include /usr/bin, which is odd, because it should. If it did, it should find the default Ruby.
echo $PATH
will display your search path. It's editable and, if
ls /usr/bin/ruby
shows that Ruby does exist in /usr/bin then you should add it back into the path. You can do that by editing ~/.bashrc, but also check ~/.bash_profile to make sure something isn't messing up the path. And, if you don't understand how the path works, take the time to read about it, because a badly set-up PATH variable can slow your use of the command-line, or cause all sorts of weirdness.
By default there is no /usr/local/bin/ruby. It won't exist using RVM or rbenv either, but Homebrew will probably put a symlink; I don't have it supplying my Ruby, so I can't check that.

Cocoapods user-install: cannot run pod command

I have installed Cocoapods on OS X Mavericks using the --user-install option (to avoid having to use sudo for the installation) following the instructions at http://guides.cocoapods.org/using/getting-started.html#getting-started . I have also created a .profile file in my home directory with the following:
export GEM_HOME=$HOME/gems
export PATH=$GEM_HOME/bin:$PATH
Cocoapods successfully installs, but I am unable to run the pod command.
When running it from the command line it says No such file or directory. From what I understand, it should be installed into the /Users/me/gems/bin folder. However, this folder does not exist at all - the only Ruby related folder in my home directory is /Users/me/.gem.
I have tried running /Users/me/.gem/ruby/2.0.0/gems/cocoapods-0.29.0/bin/pod but that results in the following error:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- bundler/setup (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from .gem/ruby/2.0.0/gems/cocoapods-0.29.0/bin/pod:14:in `<main>'
...but from what I understand, I shouldn't be running it from that location directly.
Any assistance for a Cocoapods newbie appreciated!
So after a lot of research and trying different things I have managed to get this working. I am not quite sure what eventually fixed the problem, or whether it was a combination of things, but for anyone else encountering this same problem here's what I did:
Installed the Xcode command line tools for Mavericks. The option to install this is no longer available in Xcode 5, so you need to download them from https://developer.apple.com/downloads . Some people seem to say they are already installed as part of Xcode 5 from the Mac App Store, whereas others say you need to manually install them. Either way, I figured that installing them again won't hurt.
The error message above talked about not being able to load bundler/setup. So, I (re?)installed the bundler ruby gem gem install bundler --user-install. Interestingly, when I then attempted to run the /Users/me/.gem/ruby/2.0.0/gems/cocoapods-0.29.0/bin/pod command again I got a different error: /Users/me/.gem/ruby/2.0.0/gems/cocoapods-0.29.0/Gemfile not found.
What was really handy is that after the installation of bundler a message appeared saying /Users/me/.gem/ruby/2.0.0/bin in your PATH, gem executables will not run. So, I checked out the contents of that folder and it contains the pod executable! Adding it to the PATH would certainly be handy, but I just ran it directly with the full path (after changing to my Xcode project folder containing the Podfile): /Users/me/.gem/ruby/2.0.0/bin/pod install and it all works!
When I ran pod install for the first time it showed a message saying Setting up CocoaPods master repo and stayed there for quite some time - I thought it had actually hung. However, it eventually completed. If you are unsure whether it is doing anything, or has hung, do ls -la ~/.cocoapods/repos/master/.git/objects/pack/ and look at the time modified/size of the file it is downloading (thanks to this comment for the hint).
Another tip for new players - when I tried to install a pod (in my case, BlocksKit) I got a message saying [!] The platform of the target Pods (iOS 4.3) is not compatible with BlocksKit (2.1.0) which has a minimum requirement of OS X 10.7 - iOS 5.0. This was a surprising message, since my project targets iOS 7.0. Apparently you don't need to specify the platform anymore, so I entirely removed the platform line from the Podfile and it all works.
Hope that this helps other people just getting started with CocoaPods!
After installing Mavericks, I got error with already installed cocoapods. So I ran this command to install the new updated cocoapods version, and it works now.
sudo gem install cocoapods
Thanks to the pointers in these answers, I found that the instructions for installing CocoaPods provided on the CocoaPods web site are incorrect, regarding the contents of the .profile file, specifically the path.
As Skoota noted in the question, the path $GEM_HOME/bin does not exist. A comment by Videre gives the important clue: the correct path is $GEM_HOME/ruby/2.0.0/bin.
The correct .profile contents, which works for me at least, is:
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/ruby/2.0.0/bin:$PATH
It is also worth noting that you must quit and relaunch the Terminal application for changes to the .profile file to take effect.
add:
export COCOAPODS_NO_BUNDLER=1
to your .zprofile or .bash_profile
FWIW - I ran into very similar problems. None of the above helped me so maybe others could benefit from my process.
Eventually just ran sudo gem uninstall cocoapods, deleting everything that I did before.
Followed the steps for creating the .profile file
For good measure, closed Terminal and rebooted everything.
Ran gem install cocoapods which somehow didn't run into errors this time
Checked the install by running gem which cocoapods which fortunately returned the correct path
ran pod setup which didn't raise any errors again .
Not entirely sure what actually worked and what didn't but maybe someone will find this useful.
I use homebrew to install cocapods
First install homebrew (paste this code in terminal and hit enter)
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Second enter this
$ brew install cocoapods

Resources