Rubymine debugger is failing on Macbook with M1 chip - debugging

I recently switched to a Macbook with the M1 chip, but now when trying to run my project in debugger mode on Rubymine 2021.3.3 I get the following error:
/Users/xxx/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in
`require': dlopen(/Users/xxx/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/debase-2.3.2/lib/debase_internals.bundle, 0x0009): tried:
'/Users/xxx/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/debase-2.3.2/lib/debase_internals.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')),
'/usr/local/lib/debase_internals.bundle' (no such file),
'/usr/lib/debase_internals.bundle' (no such file)
- /Users/xxx/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/debase-2.3.2/lib/debase_internals.bundle (LoadError)

Here is how I resolved this issue:
Uninstall Rubymine
Install the Appple Silicon version of Rubymine (I used the JetBrains Tool for this)
In the terminal run this command: 'gem uninstall debase' and selected to uninstall all versions.
Open Rubymine and your project
Click the debug button and select "yes" when the popup asks if you want to install missing debug gems
Next run 'bundle install' from the terminal (I ran this in Rubymine terminal). It installed debase 0.2.5.beta2
I am now up and running. Best of luck!
Fissh

Related

Skip installation of Command Line Tools when installing Homebrew on macos

I am installing homebrew on macOS High Sierra 10.13. I have already installed the Command Line Tools for Xcode which is a requirement for homebrew. When installation of homebrew starts I am forced to install command line tools (or abort). When I do this the installation process hangs. I don't understand why this hangs but more importantly I don't understand why it is trying to install CLT when I can show that they are already available on my machine.
Right click the link below and save it as homebrew-install.sh
https://raw.githubusercontent.com/Homebrew/install/master/install.sh
Open homebrew-install.sh with a text editor and change the definition of the method should_install_command_line_tools to return 1
Make homebrew-install.sh executable (by running chmod u+x homebrew-install.sh) and then run ./homebrew-install.sh
In my case the xcode command line tools can be installed.
My environment is mac os.
In the terminal please enter
xcode-select --install
And it takes a little time to install
Check out macOS requirements in this article [https://docs.brew.sh/Installation]
good luck.

cannot run gdb on mac's terminal even after codesign

I'm trying to install gdb on my Mac. I downloaded it with brew and code signed it according to the instructions on https://sourceware.org/gdb/wiki/BuildingOnDarwin
However, when I run gdb in the terminal, it still doesn't work and output the following error message:
dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.6.dylib
Referenced from: /usr/local/bin/gdb
Reason: image not found
Trace/BPT trap: 5
Does anyone know what it means? My Mac version is 10.11.5, by the way
I ran into the same issue on macOS 10.11.6, I'm guessing (and this is just speculation; I don't actually know how Homebrew works) that Homebrew installed a pre-compiled version of gdb which depended on a library that existed on the machine it was compiled with, but did not exist on my machine.
At any rate, I was able to get a working version of gdb by downloading & unzipping version 7.12 (8.1 failed to compile on my machine) from http://ftp.gnu.org/gnu/gdb/gdb-7.12.tar.gz, then compiling & installing with (IIRC) the commands:
./configure
make
sudo make install
I blogged about this and the subsequent steps (getting the executable code-signed so that macOS would allow it to debug other processes, etc) here: http://prust.github.io/posts/2018-02-24-interactively-debugging-c-in-sublime-text-3.html
I get this problem too. And I find solution in https://qiita.com/yoshixj/items/698d94337ca447e9b9de
Since we don't have /usr/local/opt/mpfr/lib/libmpfr.6.dylib
we can simply install it. Use this command:
brew install gawk
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.zshrc
I had the same error message when running gdb after installing it from Homebrew (gdb v8.1) on a Mac OS X El Capitan v10.11.6. However, installing it via Homebrew using its Python binary solved the issue:
brew install gdb --with-python
Beaware that this may take some time, since you'd be compiling gdb from scratch. After it's done, you still need to create a certificate and codesign gdb.

Is it possible to install capybara-webkit with xcode command line tools only?

The last computer I installed capybara-webkit on did not require full xcode, only the command line tools. However, now when I try to install it on a new computer, I run into the following:
Try to install:
$ gem install capybara-webkit
Get error about license: Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
Try to accept license: $ xcodebuild -license
Get error about only having command line tools: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
At this point I've just given up and started installing xcode, but it seems silly that I have to install a 4.5GB IDE just so I can accept a license agreement for the command line tools. Is there any way around that?
As you can read in capybara-webkit wiki and in QT wiki, it is not possible, as capybara-webkit requires QT.
Qt 5 sadly requires the full Xcode to be installed (> 5 GB), as opposed to previous versions of Qt which didn't. NB: We warn against using tools that try to avoid installing the full Xcode by overwriting system files in /usr/bin, since that has caused problems for other users, forcing them to reinstall OSX.
Building on OSX currently requires at least XCode version 5.1. This will remain a requirement for Qt WebEngine. Changing it would require significant changes to the Chromium code base that are going against the direction Chromium is being developed.

How to install Xcode 4.6 on Lion, needed for upgrading ruby with RVM

I was actually trying to update ruby on my OSX 10.7.5 with RVM, and after typing in the following command:
rvm install ruby
I got the following response:
Searching for binary rubies, this might take some time.
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.0.0-p247',
please read /Users/username/.rvm/log/1381215459_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 1.
Then, when I checked out the update_system.log, it showed me the actual code of a function called requirements_osx_brew_update_system(), which contained the following error message:
Xcode version older than 4.6.2 installed, download and install newer version from:
http://connect.apple.com
After installation open Xcode, go to Downloads and install Command Line Tools.
Then I proceeded to find an update for Xcode, but only found the latest Xcode 5.0, which is apparently incompatible with my OSX 10.7. Although ultimately my goal is to update ruby and install rails, which I'm sure there are many other ways to do, I'd still like to find out if I could possibly install Xcode 4.6.2 on my OSX 10.7.
UPDATE: Sorry folks, apparently my version of XCode is v4.6.1 so updating the command line tools will not work in all cases (I know for a fact it doesn't work if you're on XCode v4.3.3). YMMV
I ran into the same issue trying to do an rvm install. I got an error telling me that I needed XCode 4.6.2 or later.
Turns out all it needed was the latest version of the XCode command line tools. I followed the instructions for upgrading my command line tools from this macports article:
open the Xcode application
go to the Preferences window
open the Downloads section
click the Install button next to "Command Line Tools"
After doing this I was able to run my rvm install command and it didn't complain about upgrading XCode anymore (and finished successfully).
It seems you're going to have to install under Xcode 5. So go to https://developer.apple.com/downloads/ and log in with your developer ID to get to the older versions. There should be a 4.6.3 that you could potentially download, or even 4.6.2.
Or you could upgrade your OSX to 10.8.
Whichever you prefer.
I can't give you a direct link to it, since you need your developer information to log in yourself. But all the downloads you need are in the link provided above once you log in.
Open xcode and update it via the app store.
Then
xcode-select --install
This will install xcode via the command line

How to install command line tools on OSX Mavericks

I am running OSX Mavericks (10.9) and while trying to update a bundle in rails, I get the following error message:
"You have to install development tools first."
I have Xcode already installed and there seems to be no option to install the tools from within the Xcode 4.6. How can I download and install command line tools via terminal?
Incase, while trying to update a bundle, you get an error "You have to install development tools first." on OSX Mavericks (OSX 10.9), but you already have Xcode installed, you can still manually install the dev tools via terminal:
xcode-select --install
Do that and follow on-screen instructions. Your problem will be solved.
I summarized the steps in this blog entry "How to install command line tools on OSX Mavericks"
Installing command line tools in OSX 10.9 Mavericks changes slightly compared to previous versions of MAC OSX. Now you don’t need to install Xcode. You can install the Command Line Tools as stand alone.
Open Terminal
Type “xcode-select --install” in terminal (without quotes)
A pop-up windows will appears asking you about install tools
choose install tools
wait install to finish it will take 30 minutes
I summarized the steps in this blog entry "How to install command line tools on OSX Mavericks"
open terminal
and type
xcode-select --install
or open finder navigate to
/System/Library/CoreServices
and open Install Command Line Developer Tools.app

Resources