RVM looking for wrong path when installing - rvm

Asking RVM to
rvm install ruby-1.9.3p551
fails because of error fetching the ruby interpreter. earlier errors state
The requested url does not exist(22): 'http://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3p551.tar.bz2'
and two fallbacks fails as well...
Checking the URLs, they effectively do not exist.
http://cache.ruby-lang.org/pub/ruby/
has the list of rubies, and a proper path to download is
http://cache.ruby-lang.org/pub/ruby/ruby-1.9.3-p551.tar.bz2
why is that dot directory in the middle of an otherwise proper path and how can I get RVM to get the right path (or use the archive downloaded?

Try
rvm list known
to get the list of ruby versions.
I think that you can get this version by
rvm install ruby-1.9.3-p551

Related

How to connect Dlib to a package ? Error “Could not find the required component ‘libdlib’ “

I want to add this package to my workspace(http://wiki.ros.org/ipa_room_segmentation), so I downloaded it and put it into Myworkspace/src. Then I compiled my workspace, an error occurred like this:
Could not find a package configuration file provided by "libdlib" with any of the following names:
libdlibConfig.cmake
libdlib-config.cmake
Add the installation prefix of "libdlib" to CMAKE_PREFIX_PATH or set
"libdlib_DIR" to a directory containing one of the above files. If
"libdlib" provides a separate development package or SDK, be sure it has
been installed.
Then I have tried some others answers, install the dlib followed this page:https://www.learnopencv.com/install-dlib-on-ubuntu/
But error still there.
It that I need to connect something about the dlib to my src/CMakelist.txt?
Nice! I’ve found a method to crack this nut. All u have to do is using this line:
sudo apt-get install ros-kinetic-libdlib
PS: if u use another version of ROS, replace the “kinetic”.
This method can solve many problems Which begin with “could not find ...”,u just need to put the missing one after :
sudo apt-get install ros-kinetic-

jspm install materialize but 404 on materialize.js when it runs

I am getting a 404 error on this on this get:
http://localhost:9000/jspm_packages/github/Dogfalo/materialize#0.96.1.js
I have used jspm to install materialize, and it the package is there as expected.
However, there is no actual file named materialize#0.96.1.js in the Dogfalo directory.
Is there something else I should be doing to get this to work?
Turn out that the structure of the materialize#0.96.1 is not fully consistent and indeed missing materialize#0.96.1.js file in the package base folder. Possible solution is to use next minor version materialize#0.97.0 which has proper structure.
To get newer version run
jspm install materialize=github:Dogfalo/materialize#0.97.0

How to reload .ruby-version/.ruby-gemset/.rvmrc without leaving current directory?

We are using RVM to manage rubies and gemsets for dozens of projects.
Sometimes I'll either edit the .ruby-version or .ruby-gemset file, or pull a newer version of those file(s) from our VCS, but of course RVM is unaware of these changes unless I tell it. And if the changes come from the VCS, even I may not be aware of them. So what's the best way to do this?
It would be nice to be able to automate the process, so that it is done automatically any time I fetch changes from the repository.
The only way I know of to get RVM to re-read these files is to cd to another directory, then return to the project directory. This is obviously simple, and easy, but it seems more than a little inelegant, and isn't self-documenting.
I'd expect there to be some command like rvm reload (which exists, but does something else) to re-read the project files, but I can't find anything of the sort.
I think I've found an answer, but as it is undocumented I don't know if it's really legit.
It seems that if you do:
$ rvm use .
It'll apparently (re)read the .ruby-version and .ruby-gemset files (not sure of .rvmrc files, since we don't use them). I discovered this by trying rvm use .ruby-version and rvm use .ruby-gemset, both of which seemed to cause RVM to read both 'dot' files.
This functionality is not currently (as of RVM 1.23.13) mentioned in the documentation (i.e. rvm help use).
Maybe it should be?
I use .rvmrc and I used to do
cd;cd -
but now I do
cd .
If I do
rvm use .
I get
Could not determine which Ruby to use; . should contain .rvmrc or .versions.conf or .ruby-version or .rbfu-version or .rbenv-version, or an appropriate line in Gemfile. ( see: 'rvm usage' )
which I don't really think is true (because I do have a .rvmrc file in .), or perhaps I just don't understand.
Edit:
I am using rvm 1.25.33
I didn't mean to come across as critical, just trying to add more info!

RVM setting incorrect environment path

I was having trouble installing rvm on WebFaction, so I tried just copying over the .rvm directory with my rubies and gems. This has mostly worked. rvm works, it’s referencing the correct ruby, and the correct gem. The problem it seems, is rvm is looking for an environment file in the wrong place. It’s trying to use:
/Users/jezen/.rvm/environments/ruby-2.0.0-p247
Whereas it should be using:
/home/rekyl/.rvm/environments/ruby-2.0.0-p247
Where can I set the correct path?
check /Users/jezen/.rvm/wrappers/ruby-2.0.0-p247/ruby but also /home/rekyl/.rvm/environments/ruby-2.0.0-p247 is relevant, make sure all environment variables point to proper path:
env | grep rvm

How to get rid of RVM notice

Is there a way to get rid of the warning, when I traverse into a folder having a .rvmrc file.
====================================================================================
= NOTICE =
====================================================================================
= RVM has encountered a new or modified .rvmrc file in the current directory =
= This is a shell script and therefore may contain any shell commands. =
= =
= Examine the contents of this file carefully to be sure the contents are =
= safe before trusting it! ( Choose v[iew] below to view the contents ) =
====================================================================================
Do you wish to trust this .rvmrc file? (/home/sam/myrailsapp/.rvmrc)
y[es], n[o], v[iew], c[ancel]> y
To switch from .rvmrc to .ruby-version + .ruby-gemset
rvm rvmrc to .ruby-version
There is a bug right now in RVM that keeps it asking you trusting .rvmrc.
Solution is simple - use .ruby-version instead:
1.9.3
or
1.9.3#gemset
Gemset will be created automatically for you.
.ruby-version is only for Ruby versions switching. If you need some scripting when switching Ruby, you still need .rvmrc.
According to the documentation:
To turn off the project specific rvmrc functionality in your $HOME/.rvmrc set:
rvm_project_rvmrc=0
I don't have a RVM instance to try it out, but I guess that's what you are looking for.
I'd also suggest to use rbenv instead of RVM, for the following reasons.
If RVM has been installed with sudo, you'll have to cd to the directory as root.
If you trust the .rvmrc or .ruby-env as root, the notice shouldn't come back.