I installed "eclipse" and want to run "fxruby" on fedora "linux", but it does not work it.
The error says :
cannot load such file -- fox16 (LoadError)
I installed this file with command
gem install fxruby
but fxruby not exist in gem list.
How can i fix it?
The warning about the path you can safely ignore (at least for now). What the error is telling you is that you do not have the FOX development headers and libraries installed, so it couldn't build the fxruby gem. So you must install the fox development package - it may be named something like "fox16" or "fox16-devel", or something else depending on what version of Linux you're running. (If all else fails, you can build it yourself).
After that, compiling fxruby (using gem install fxruby) should work.
If you do want to build FOX yourself, here are (approximately) the steps:
1) Go to the FOX website http://www.fox-toolkit.org/ , and download the latest 1.6 (stable) version (at the moment, fox-1.6.57.tar.gz).
2) I would create a directory ~/src, then cd ~/src, and unpack the downloaded package, e.g., tar xvf ~/Downloads/fox-1.6.57.tar.gz (adjust the path according to wherever you have actually downloaded the package).
2) You should now have a subdirectory fox-1.6.57 (i.e., ~/src/fox-1.6.57/). Cd to it, and read top-level documentation in README and INSTALL.
3) Run the configure script, ./configure or ./configure --prefix=$HOME.
The difference between these invocations is that if you run a plain ./configure, the software will be installed under the default location /usr/local (this will require root access when installed), whereas the invocation ./configure --prefix=$HOME will result in the software being installed under $HOME. The latter will not require root access to install and probably is better if you're just installing the software for your own use.
4) I you are installing under your own home directory, create appropriate subdirectories: cd ~; mkdir bin include lib'. (The installation may take care of this, but it doesn't hurt to pre-create the directories.)
5) Now run make. That should compile and build the FOX libraries under the local directory (~/src/fox-1.6.57/)
6) Run make install. That will install the libraries under either the default location of /usr/local or your home directory ~ (depending on your configure option)
7) A this point, you should have the FOX libraries and headers installed. Now try gem install fxruby. (If you're going for a local install, probably gem install fxruby --user-install.)
solved for fedora
i installed all of them :
ruby-devel.x86_64
fox-devel.x86_64
sudo dnf install redhat-rpm-config
yum groupinstall 'Development Tools'
yum group info 'Development Tools' yum -y install gcc ruby-devel
rubygems compass
gcc compt gcc-c++-x86_64-linux-gnu.x86_64
gcc-c++
[
gcc-c++-8.2.1-4.fc28.x86_64 C++ support for GCC
libstdc++-devel-8.2.1-4.fc28.x86_64 Header files and libraries for C++ development
]
sudo dnf install libpng12-devel.x86_64
sudo dnf install libb2-devel.x86_64
sudo dnf install libX11-devel
sudo dnf install libXcursor-devel.x86_64
sudo dnf install libXext-devel.x86_64 libXrandr-devel.x86_64
gem install fxruby
Related
I'm trying to base a Dockerfile off of Heroku's new heroku/heroku:18 image (which uses Ubuntu 18.04) and running into some issues that I didn't have in their very old heroku/cedar:14 base image, I believe due to them having different preinstalled packages. (I updated the base image to heroku/heroku:18 because I want to use the webpacker gem and in Cedar-14 I was getting: Webpacker requires Node.js >= 6.0.0 and you are using 0.10.25. If there's an easy way to install a newer Node in the older base image I'd love to hear it!)
My problem is that no gems with C extensions (like puma, pg, msgpack, etc. etc.) install successfully with this new base Docker image. The error messages vary slightly from gem to gem but all generally say:
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
Various GitHub issues with similar problems have had me try:
apt-get installing:
build-essential
libpq-dev
libssl-dev
openssl
libssl1.0-dev
gcc
gcc-5
automake
make
Using heroku/heroku:18-build instead of heroku/heroku:18
None of these solutions solves the issue.
For reference, here are the relevant parts of my Dockerfile:
FROM heroku/heroku:18
RUN apt-get update && apt-get install -y nodejs --no-recommends
RUN (mkdir -p /ruby && cd /ruby && curl https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-2.5.0.tgz -s -o - | tar xzf - --no-same-owner)
ENV GEM_HOME=/ruby/gems GEM_PATH=/ruby/gems
RUN gem install bundler
RUN bundle install
I've tried running
sudo apt-get install libsndfile
> E: Unable to locate package libsndfile
So then I try
sudo apt-get install libsndfile1
It installs, but where, how?
find /usr/ -name libsndfile*
> /usr/lib/x86_64-linux-gnu/libsndfile.so.1
> /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
At the end of the day my goal is to get the lib to work for ruby, with either:
gem install sndfile
gem install ruby-audio
When I try installing ruby-audio, I get:
extconf.rb:21:in `<main>': Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)
So for some reason the library doesn't install properly.
When you want to compile something against a library you'll need not only the library itself, which is usually one or more .so type files, but the header files that describe how the library works. These are often omitted unless you install the -dev version of the package:
apt-get install libsndfile-dev
This should give the Ruby extconf.rb enough information to compile and link against that library.
I have messed up the Ruby installation on my Ubuntu. I had it installed previously with RVM but I had to uninstall it (rvm implode). Now, I have downloaded the latest source (v 2.3.0) and built it from source
./configure
make
sudo make install
Then, I try to install RubyGems but when I try to run ruby in terminal I get
/home/ali/.rvm/rubies/ruby-2.3.0/bin/ruby: No such file or directory
Why is it still looking for it in .rvm?
I try to install ruby and rails to start to learn ruby on rails.
I work on Windows. After many search and tries, I gave up and installed a fresh ubuntu 14 x64 in a VirtualBox.
I installed ruby with apt-get, but its files get spread all over the file system (/bin, /var...). So, I have to use always sudo and search all over the place when installing gems.
I would like, just like in windows, find a ruby tar.gz which I can decompress in a folder of mine, with all files at the same place, where I have the "control" over the files, and I can watch easily what it's hapenning while installing gems, rails, etc...
The problem : I cannot find any tar.gz (or similar archive) of ruby for linux which I simply can uncompress in a folder and work with it (I can manage the $path). The only one I can find is for Windows !
Thanks !
It sounds like what you want is Ruby's source code. Go to https://www.ruby-lang.org/en/downloads/ and look under "Compiling Ruby - Source Code". That's where you'll find the .tar.gz files you want. You'll need to compile and install it before you can actually use it. Installing normally copies files "all over the file system", but you can force it to install to a specific folder by passing the --prefix option to the ./configure script.
$ tar -xf ruby-2.2.1.tar.gz
$ cd ruby-2.2.1
$ ./configure --prefix=/my/ruby/dir
$ make && make install
You may need to install some dev packages in order to get it to compile, but any compilation errors should make it clear what you need.
These instructions are also described here.
Thank you Max for your response.
In case someone else tries to compile ruby on a fresh new ubuntu, this is what I had to do to build and use it with success :
Install missing dependencies :
get the latest "Stable Snapshot" from https://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz and not the "Current stable"
sudo apt-get install libffi-dev
sudo apt-get install zlibc zlib1g zlib1g-dev
sudo apt-get install openssl
sudo apt-get install libssl0.9.8 [[[ first, find the latest version with : apt-cache search libssl | grep SSL ]]]
sudo apt-get install ca-certificates
sudo apt-get install libssl-dev
sudo apt-get install libreadline-dev
Then :
Edit downloaded file tools/rbinstall.rb, goto line 714 and correct the typo :
change "rescue LoadErroe" to "rescue LoadError" (not corrected in date of 20 March 2015).
Run Max's instructions above
Don't move the ruby destination folder declared with "--prefix" (even if you try to correct the shells in ruby/bin)
Finally, for using rails :
sudo apt-get install libsqlite3-dev
sudo apt-get install nodejs ==> inorder to have a js runtime
I would like to install Zephir on my Ubuntu machine.
The goal is to convert some of my existing code into a PHP extension, in order to get the benefits of faster execution.
Any pointers are more than appreciated.
Install zephir in Ubuntu..
You need download Zephir-master from https://github.com/phalcon/zephir
You nedd download json-c from https://github.com/json-c/json-c
1) sudo apt-get install gcc make re2c phpX phpX-json phpx-dev libpcre3-dev
2) Open folder Json-c
2.1) sh autogen.sh
2.2) ./configure
2.3) make && make install
3) Open folder zephir-master
3.1) ./install -c
4) zephir help for to test the correct installation
Please note Zephir is currently in Alpha stage and therefore bugs can be expected.
You need to have certain packages installed:
json-c
re2c
In the command line type:
sudo apt-get install libjson0 libjson0-dev libjson0-dbg
sudo apt-get install re2c
Once you have the required packages installed, you can generate the parser as follows:
./generate
Compile the extension (this is your code):
./zephir
The code produced is placed in ext/, there you can perform the standard compilation:
cd ext/
sudo ./install