I try to delete all ruby related folders and gems. Do you know hoe to find all these and where is the ruby directory in ubuntu?
To remove all gems, follow this page:
http://geekystuff.net/2009/01/14/remove-all-ruby-gems/
Works like a charm
Related
sorry for my english.
I was learning about ruby on rails and i tried to update to rails 5.
I uninstall olders version of ruby and now i have problems.
i have reading http://railsapps.github.io/updating-rails.html
i made a mistake because i uninstalled something that i dint do.
now i have ruby-2.3.1
i have this error now.
.gem/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `require':
libruby.so.2.2: cannot open shared object file: No such file or
directory -
/home/yvasquez/.gem/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.so
(LoadError)
Thanks for reply
I had the same error with ruby 2.3 & 2.3.1. It is because it fails to recognize the devkit (which i hope you need not install unless you're using Windows) gems as native ruby gems. The problem is with the latest ruby version and the gem configs located in the directory, where you will have to manually specify the native part to each gem.
Anyway, I went back to ruby 2.2.5, and everything works perfectly for me.
Try ruby 2.2.5 OR since you are on linux, try re installing and make sure you add everything to the path so your gems are recognized. Also, try installing sqlite3 separately and add to path.
I'm trying to initialize a new rails app on windows, and running rails new <appname> generates everything up to vendor/assets/stylesheets/.keep, but when bundle install is run, rails generates this error:
Checksum of /versions does not match the checksum provided by server! Something is wrong.
I'm not sure what's causing this, as I've done nothing to rails itself. Any help is appreciated.
Edit: If it's an error caused by windows being finicky, I have the option of moving to Linux, but I'd like to know what's wrong first.
I had the same issue using windows, and was able to solve it by uninstalling bundler and installing an older version.
rails new <appname>
gem uninstall bundler
gem install bundler -v 1.9
cd <appname>
bundle install
That did it for me!
In my case there was a *.pre.1 version and I chose to uninstall that particular version and then "bundle install" worked.
Try removing your ruby cache folder and then try again. So for example if you are on Linux machine and you are using rbenv and say ruby 2.1.5 folder. Your path would be similar to something like (Not sure where on windows ruby is stored):
~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/cache/
Removing this folder and trying bundle install again should resolve the issue.
It will be great, if you move to a Linux machine.
On windows it's a hell to pay in my 5 years of experience what i have learned is not to mess with (ror) or (rs) in windows. here's a cheeky thing you can do an easy way. I believe you are using github as repo, as a editor you are using sublime if thats is a case open your gemfile you will see check the image or
try to clear cache on your server or update the gems.
I had this same exact error and solved it the following way. I think you are missing the ruby DevKit being installed.
Go here http://rubyinstaller.org/downloads/ and download/install the latest 32-bit Ruby version (as of writing this 2.2.4, you will need it for the web-console gem)
Make sure to add your ruby\bin folder to your environmental path variable
The trick is hidden near the bottom-left of the same page under the "Development Kit" section. You need to download and extract the right one into a permanent location (as of writing this for 32-bit - DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe)
After extracting the files, go into the main directory and run "ruby dk.rb init" followed by "ruby dk.rb install" (More information can be found here
That fixed it for me and i can now fully install with no checksum issues
This problem began when i tried to run my app. I wrote rails s and the console said me Could not find sdoc-0.4.1 in any of the sources Run bundle install to install missing gems. Then i wrote bundle install and the message that appeared was Checksum of /versions does not match the checksum provided by server! Something is wrong.
I solve this problem following this steps:
Wrote bundle install
The console said me Could not find sdoc-0.4.1 in any of the sources
Then i reinstalled this gem with gem install sdoc -v 0.4.1
I tried again to write rails s and it's was solved.
`
I have rails 3 installed with rvm and today i tried to add the alias 'subl' (from Sublime Text 2) to use on terminal. The problem is the 'subl' command works and i think i messed up with the paths, because the rails command is not found anymore.
How do I find the correct rails path and fix this problem?
Thanks in advance.
Depends on your setup. If you're using rvm, it will probably be
~/.rvm/gems/<ruby version that you use>/bin/rails
If you're using the system ruby, then have a look in the gems folder of wherever your ruby install is, and add that to the path. On windows, the ruby installer generally puts it in
C:\Ruby
Or something like that. On Mac, the default system ruby is
/usr/bin/ruby
I setup rails 3.1.0.rc5 on my friends vista machine last week. Everything installed and i can run an application we're working on just fine, however, the rails command does not resolve. To start the server, i had to do the old fashioned: ruby script/rails s style. He has the ruby bin on his path, as ruby -v resolves fine. Any ideas on what to check?
Note i downloaded a 1.9.2 installer from rubyinstaller.org, setup the dev pack, and installed rails through bundler.
It sounds like your path isn't pointing to your rails gem bin.
My first suggestion was going to be use rvm but since you're on windows that won't be an option. RVM suggested pik for windows users, and if it works similar to RVM, you'll save yourself a ton of headaches.
I'm running rails version 2.3.5 and rubygems version 1.3.6, when I script/server I get this error
Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again:http://rubygems.rubyforge.org
any ideas how to fix this?
The first thing you should do is run: gem env
This will output, amongst other things, the RUBYGEMS_VERSION and your GEM_PATHS. Verify that everything you think is true, is indeed true.
In the GEM_PATHS, you will probably see multiple paths, the top most being the primary path.
You can set GEM_HOME to the primary gem directory in the your .bash_login/etc file. Open a new terminal and run gem env again to make sure that it is being picked up.
As Gordon indicated, make sure these GEM paths are in your PATH.
Some other things to think about ownership/permissions. If you use sudo when working with gems on your system, they get installed in a different directory than when you install/update normally.
Perhaps you installed the rubygems using sudo, but rails is not running as root.
Read the installation notes if you still cannot figure it out: ruby gems installation
Maybe it’s not finding your correct gem path. I’ve had similar problems related to that. You might need to update your bash prefs eg in .basrc you might have something like this:
GEMS=/home/me/ruby1.8/lib/ruby/gems/1.8/bin/
export PATH=$RUBY:$GEMS:$HOME/bin:$PATH:$NGINX:$MONIT:$GIT
I just ran into this issue today, and for those of you who do something similar to what I did here is the fix and a little background.
I was installing some dependencies for rmagik, took the easy way out and used macports, it automatically went ahead and updated my default ruby to /opt/... so rubygems went missing since it only intalled ruby.
my advise, use rvm (http://rvm.beginrescueend.com/) like raphael_turtle says, since you will want RVM to be in charge of updating your links to ruby, rubygems and rails.
*Be wary when installing via macports or brew, just make sure you see what else is being installed, and don't accidently overwrite your local configs.
I had the same problem. My installation was done for me by technical support, so it was not me who did the installation (security problems).
The problem was that I didn't have some access rights, so this helped:
sudo - su user_name_with_enough_access_rights
And then run scripts/server again.
I couldn't figure out what was wrong so I installed rvm with a new version of rails and ruby.