So I'm trying to install homebrew on my Macbook Pro in order to be able to run NINJA-IDE, and every time I execute the code that is given on the site I get this:
Joshs-MacBook-Pro:~ joshua$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/share
==> The following directories will have their group set to admin:
/usr/local/share
Press ENTER to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/share
Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/share
==> Downloading and Installing Homebrew...
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
-e:84:in `git': undefined method `<' for nil:NilClass (NoMethodError)
from -e:153:in `block in <main>'
from -e:152:in `chdir'
from -e:152:in `<main>'
Joshs-MacBook-Pro:~ joshua$
I've also thoroughly researched the line that says to "re-run as root via sudo" to no avail, so I'm assuming the issue lies with the NoMethodError that I keep seeing. Any help with this will be very much appreciated!
Install XCode via the App Store if you haven't yet. Then run it, and accept the license via the GUI. Now run the Homebrew install script again. This fixed the problem for me.
Just installed XCode new and never opened.Turns out you have to agree the license before working with Homebrew scripts. Run XCode by itself and agree the license that should solve your problem.
Related
I hope there will be a warrior.
I'm deploying my rails project on AWS EC2.
System type: Cent OS
ERROR:
brew install mysql
I'm using linuxbrew to install mysql but it gives me
make error
I installed rvm, rails, mysql(using yum not brew)...
The disaster is from now...
rails db:migrate
require': libssl.so.10: cannot open shared object file: No such file or directory - /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/mysql2-0.5.2/lib/mysql2/mysql2.so (LoadError)
I wasted 3 days for this error.
Please help me...
As mentioned by GKE, you need libssl packages. I think somehow your box is missing the symlink.
Try:
brew install openssl
brew link --force openssl
This should fix the problem. If it doesn't, you might have to create symlinks manually by:
cd /usr/lib64
sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10
Simillar question - LoadError - cannot open shared object file - file is present, but it says no such file
Finally, I found it.
I can't sure exactly but when you install openssl using brew,
the path is here:
/home/linuxbrew/.linuxbrew/lib/
So, I have to use this here
sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10
Thank you all!!!!!
GOOD DAY!!!!
This is giving me a headache. I'm continuing a Rails project that started on Linux and I keep getting this when I run Puma on Ruby Mine:
Error:[rake --tasks] DL is deprecated, please use Fiddle
rake aborted!
LoadError: Could not open library 'libcurl': The specified module could not be found.
Could not open library 'libcurl.dll': The specified module could not be found.
Could not open library 'libcurl.so.4': The specified module could not be found.
Could not open library 'libcurl.so.4.dll': The specified module could not be found.
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/ffi-1.9.14-x86-mingw32/lib/ffi/library.rb:147:in `block in ffi_lib'
[...]
Now, what have I tried?
I installed Puma successfully on Windows following this steps
I downloaded curl-7.50.1-win32-mingw and put it on "C:/curl"
I added C:/curl/bin and C:/curl/include to PATH
I installed successfully curb gem with gem install curb --platform=ruby -- --with-curl-lib=C:/curl/bin --with-curl-include=C:/curl/include
I put the .dll files in Ruby bin folder, installed the certificate in curl/bin and even run the curl.exe just in case.
I rebooted the machine but I keep seeing the same error.
I do not know what to do. How to successfully install libcurl on Windows for use with Rails
Answer that worked for me (W10/Ruby2.6.0) was:
Download cURL from the following URL: https://curl.haxx.se/windows/ (I chose 64bit because that's the system I'm using)
Go into the archive and browse to /bin
Locate libcurl_x64.dll (it may be just libcurl.dll)
Extract to your local drive
Rename it to libcurl.dll if it has the _x64 suffix
Cut + paste the file into the /bin directory of your Ruby installation
I just had the same problem on Windows 7 x64 and answered about it here. (Similar to you, I tried a lot of things that I thought should work but didn't.)
What worked was:
To take a libcurl.dll from one of the packages found here, https://curl.haxx.se/download.html#Win64, and put it on the PATH.
(Link was updated, but originally pointed to version 7.40)
I just put it under \ruby24\bin\
Maybe for you it's C:\Ruby24-x64\bin
(Here are things I tried that didn't work:)
Putting on the PATH: the cygcurl-4.dll obtained from the current Curl Download Wizard
Renaming the above cygcurl-4.dll to libcurl.dlland putting it on the PATH
Installing the msys2 package libcurl-devel 7.57.0-1
Renaming the msys-curl-4.dll (from msys2 found at msys64\usr\bin) to libcurl.dll
I didn't try building curl / libcurl from the latest source because I already have the latest according to pacman -Ss libcurl:
msys/libcurl 7.57.0-1 (libraries) [installed]
Multi-protocol file transfer library (runtime)
msys/libcurl-devel 7.57.0-1 (development) [installed]
Libcurl headers and libraries
More details about this in these other questions:
jekyll serve dependency error - Could not open 'lib curl'
Typhoeus Windows installation
Rails Typhoeus Curl Trouble
how to install libcurl on windows 7 64bit
I had the same issue and tried the same steps that OP has listed. After breaking my head, cursing the existence of windows for some time and almost convincing the client to shift to a nix server I figured the libcurl.dll that I downloaded from https://curl.haxx.se/ (as suggested in all related posts) was corrupt.
Downloaded the one provided here http://www.dlldownloader.com/libcurl-dll/ and viola the ffi was able to load this one.
Hope this helps anyone else facing this issue
For anyone running Ruby 2.5 on Windows, my solution was similar to the top solutions however I had to move it to place the file in both the \bin folder and \bin\ruby_builtin_dlls folder to work.
Some other things is that I downloaded the 64bit version and changed its name to libcurl.dll. Also make sure to restart your IDE/terminal and then try to start the server again.
None of the solutions worked for me - no matter what I tried, libcurl failed to load.
I then did the following:
Created a mini Ruby program that just tried loading the dll:
require 'ffi'
FFI::DynamicLibrary.open("libcurl", FFI::DynamicLibrary::RTLD_LAZY | FFI::DynamicLibrary::RTLD_LOCAL)
Ran procmon and filtered by ruby.exe process and any path containing "dll"
As a result, I saw the following:
C:\Ruby27-x64\bin\libzstd.dll - NAME NOT FOUND
That gave me an idea that I was missing a dependency. The libzstd.dll file is part of the mingw-w64-x86_64-zstd package but luckily I just had it sitting on my drive elsewhere (as part of the GIMP installation).
I copied libzstd.dll to C:\Ruby27-x64\bin and the problem was solved. Of course, I had libcurl.dll in my path already (got it from https://curl.haxx.se/windows)
I want to use wpscan, but i get libcurl error
OK, if you also get the same error, then in a very easy way I will try to give the solution.
Just copy the libcurl.dll file to system32 if your windows is 32 bit,
If your windows 64 bit copied to syswo64.
Good luck.
Well, the issue is caused by a missing lib as said in the error, So the solution is to download the lib here: http://www.dlldownloader.com/libcurl-dll/ and navigate to the ruby folder under bin and drop it there make sure to rename the downloaded .dll file to this exact one: libcurl.dll else won't work even after.
The solution which worked for me was download the dll, keep the exact name libcurl.dll and copy it to c:\windows\system32
If you're using WSL on Windows 10 (Make sure to update to Ubuntu 16.04) the following instructions worked perfectly for me. You might need to completely wipe what you have installed however.
Within bash:
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev postgresql-client-common postgresql-client libpq-dev
And then to build our path and plugin directory for rbenv:
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
Finally we come to ruby:
rbenv install 2.4.1
rbenv global 2.4.1
Then bundler:
gem install bundler
rbenv rehash
Now our prerequisites:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
And then finally Rails:
gem install rails
rbenv rehash
I tried to install Ruby on Rails in my user account. Atraves user terminal, do the following.
I find that the minimum requirements are met
I write the command line to install Rails (poor man).
I get the following error message at the beginning of the installation process:
Searching for binary rubies, this might take some time.
Checking requirements for debian.
Installing requirements for debian
user password required for /usr/bin/env PATH=/usr/local/bin:/usr/bin:/bin:usr/local /games:/usr/games:/home/user/.rvm/bin:/sbin:/usr/sbin:/usr/local/sbin apt-get --quiet --yes update:
Updating system.
Error running requirements_debian_update_system ruby-2.0.0-p247, please read /home/user.rvm/log/1380100570_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 1.
Maybe your problem is related with sudoers file.
try edit this file:
vim /etc/sudoers
in this file should be your user name with permissions. For example:
your_user_name ALL=(ALL) ALL
try to add if it don't exists:)
I solved the problem by reinstalling ruby separately with the version I wanted to use.
Then install rails via gem install rails-v
then clear the gem that made reference to the error and rerun bundle install . Then select the version I wanted to use installing ruby rvm rvm use default -v
and Thank you for Helping me!
Long story short, I put this in the terminal
curl https://raw.github.com/gist/1688857/rbenv.sh | sh ; rbenv global 1.9.3-p327-perf
I ended up downloading/installing ruby over my current ruby/rails. I stopped it in time but it was too late. Both my rails and my ruby commands didn't work .....
Originally I installed railsinstaller to get my rails/ruby up and running.
I did rvm implode, removed rvm path in .bash_profile,
removed /etc/rvmrc file as well. I figured the rmv clash with the new ruby that I downloaded.
Originally I used railsinstaller to get ruby/rails up and running.
Then I tried to install railsinstaller but it didn't work! I later uninstalled railsinstaller because I want to try brew.
Here is my .bashrc profile
export PATH="/usr/bin:$PATH"
export PATH="/usr/local:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH=/usr/local/mysql/bin:$PATH
export PATH="/usr/local/opt/ruby/bin:$PATH"
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
Here is what I get when I run brew doctor
Warning: Setting DYLD_* vars can break dynamic linking.
Set variables:
DYLD_LIBRARY_PATH
Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools for Xcode" package provided by Apple.
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
autoconf
libtool
(I tried brew link above)
Error: Could not symlink file: /usr/local/Cellar/autoconf/2.69/bin/ifnames
/usr/local/bin/ifnames may already exist.
/usr/local/bin may not be writable.
same thing happen with libtool
Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path:
sudo xcode-select -switch /Applications/Xcode.app
When I run brew install ruby .......
NOTE: By default, gem installed binaries will be placed into:
/usr/local/opt/ruby/bin
You may want to add this to your PATH.
Warning: Could not link ruby. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link ruby'
==> Summary
🍺 /usr/local/Cellar/ruby/2.0.0-p0: 877 files, 18M, built in 2.7 minutes
There are bash commands that I can not access. I have to source my bashprofile everytime to get some bash commands to work.....
I am new to rails and I am developing a rails app. The rails mvc concepts are easy to grasp, but I didn't pay much attention to.
-paths
-environments
-rbenv
-rvm
-brew
-bash commands
etc
This is the type of thing where you start making the app after installing everything and don't quite know how ruby/rails work under the hood when something breaks.
If someone can point me to the right direction. I will love your help. I will try to research this further myself.
Thanks!
If you need more info please let me know and thanks!
HI HERE IS MY UPDATE
Thanks! so I installed xcode,
I went through this tutorial
https://coderwall.com/p/auvm9g
and installed everything successfully but my computer can't find the ruby/rails that I installed. It came on when the installation finished but I lost it after I exit the terminal.
I did brew doctor
Warning: Setting DYLD_* vars can break dynamic linking.
Set variables:
DYLD_LIBRARY_PATH
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
Here is my .bashrc
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
export PATH="/usr/local:$PATH"ls
export PATH=/usr/local/mysql/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
Here is my .bash_profile
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into shell session *as a function*
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
PATH="/usr/local/bin:/usr/local/heroku/bin:/usr/local/mysql/bin:/usr/local/bin:$PATH"
ruby -v
rbenv: ruby: command not found
The `ruby' command exists in these Ruby versions:
1.9.3-p286
rails -v
rbenv: rails: command not found
The `rails' command exists in these Ruby versions:
1.9.3-p286
\curl -L https://get.rvm.io | bash -s stable --ruby
Upgrading the RVM installation in /Users/judyngai/.rvm/
RVM PATH line found in /Users/judyngai/.zshrc.
RVM sourcing line found in /Users/judyngai/.bash_profile /Users/judyngai/.zlogin.
Installing rvm gem in 1 gemsets ERROR: Loading command: install (LoadError)
cannot load such file -- openssl
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Upgrade Notes:
* WARNING: Above files contains `PATH=` with no `$PATH` inside, this can break RVM,
for details check https://github.com/wayneeseguin/rvm/issues/1351#issuecomment-10939525
to avoid this warning append #PATH.
* No new notes to display.
my .rvm and .benv are in my Users/judyngai/.rvm
I am pretty sure I have a paths problem, if someone can enlighten me I will be really happy and grateful!
You have a few things going on.
First off, I haven't used railsinstaller, but it looks like a bad deal. Many of these "one-click-install" applications end up leaving you in a mess like you have here. I recommend removing everything rails installer has done and following something like this guide to get you going: https://coderwall.com/p/auvm9g. That does each part separately.
But, if you want to try and fix what you got...
First, looks you have some issues with homebrew according to brew doctor. Largest of which is you need to install Xcode Command Line Tools.
That should also take care the autoconf and libtool warnings.
Looks like you also need change permissions on you /uar/local directory since that's where homebrew puts everything.
Second, installing Ruby through brew is a bad idea. I recommend either rbenv or rvm.
After the reboot which was required to update all the packages,
ruby -v
doesn't work. It says rails is not installed either, but I guess it should be the similar issue. when I do:
sudo apt-get install ruby
It says the newest version is already installed.
When I do:
dpkg -L ruby
I get the following output:
/.
/usr
/usr/bin
/usr/share
/usr/share/doc
[and other stuff..]
But I realized $PATH already includes /usr/bin:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
:/sbin:/bin:/usr/games:/home/ubuntu/.rvm/bin
May I know why I'm still getting the following error message?:
The program 'ruby' is currently not installed. You can install it by typing:
sudo apt-get install ruby
My .bashrc already has this too:
PATH=$PATH:$HOME/.rvm/bin
dpkg will be checking in a database that it maintains, whereas trying to execute ruby uses the PATH. If I recall correctly, Ubuntu has a bash handler configured to execute when any command is unresolvable; it seems that it just displays that generic message rather than checking with dpkg first.
It is possible that ruby has disappeared from your filesystem (or at least the directory it previously resided in), or that your PATH was changed.
What do you get if you execute "which ruby" and "where ruby"?
Lastly, Ubuntu can complain that a program cannot be found when it is present. This occurs when running a 64-bit version of Ubuntu, without the necessary x86 libraries installed, and trying to execute a 32-bit binary. However, I recall the error message being more along the lines of "file not found".