linecache19 with ruby 1.9.3-p194 and rvm - ruby-on-rails

I've been trying to install linecache19 following these instructions
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
gem install linecache19-0.5.13.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p194/
I seem to be able to run curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem just fine, but when I run gem install linecache19-0.5.13.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p194/ I get this output:
ERROR: Could not find a valid gem 'linecache19-0.5.13.gem' (>= 0) in any repository
ERROR: Possible alternatives: linecache193
I am running all these commands in the root directory of my rails app.
EDIT
I'm using RubyMine, so I think I have to stick with the somewhat older debugging tools
EDIT 2
I got this to work by visiting the rubygems page and downloading linecache19 from there, then running gem install from the download directory

Something was amiss when I tried to curl the gem. When I visited the rubyforge site and downloaded the gem manually, everything worked.

Related

An error occurred while installing mysql2 (0.5.4), and Bundler cannot continue - in rails project

I'm trying to create a project with mysql as a database, ran command
rails new project_name -d mysql
got the following errors
Could not find gem 'mysql2 (~> 0.5)' in locally installed gems. rails importmap:install
Could not find gem 'mysql2 (~> 0.5)' in locally installed gems. Run bundle install to install missing gems.
rails turbo:install stimulus:install Could not find gem 'mysql2 (~> 0.5)' in locally installed gems.
Run bundle install to install missing gems. "
so i ran
bundle install
but it fails and at the end it tells me
An error occurred while installing mysql2 (0.5.4), and Bundler cannot continue
full error https://pastebin.com/jiX7V0Z0
I'm running windows (all answers I found were for linux or mac), any help is appreciated
Edit : as Christos-Angelos Vasilopoulos mentioned, answer in this issue worked https://github.com/brianmario/mysql2/issues/1210#issuecomment-965862944
what I did was the first two steps
1 - Start a cmd terminal and run ridk explicitely by running:
c:\your path to Ruby31-x64\ridk_use\ridk.cmd enable.
This gives you the right environment to do the rest.
2 - From that cmd, run
gem install mysql2 --platform=ruby -- --with-mysql-dir=c:/your path to Ruby31-x64/msys64/mingw64
(no particular quote was neeeded and I used forward slashes).
It is an open issue with mysql2 though there is a workaround. Check this thread from GitHub the last comment is the thing you need.

Bundle load error when invoking bundler

I'm trying to set up a ruby project and rather new to the process of automating via bundle. However when I try to execute any bundle command I'm met with the following error:
/usr/local/bin/bundle:26:in `load': cannot load such file -- /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle (LoadError)
from /usr/local/bin/bundle:26:in `<main>'
I have tried removing and reinstalling Ruby, as well as removing the bundler gem itself. But to no avail. My Rubygems version is 2.3.0 and the Ruby version is 2.3.1 which is the latest stable version for Ubuntu
Problem related to bundler==1.16.1 try to reinstall with bundler=1.16.0 for now.
gem uninstall bundler -x
gem install bundler -v 1.16.0 --force
More info and bug report can be found here: https://github.com/bundler/bundler/issues/6227
I was able to uninstall bundler -v '1.16.1' as described by Mr.Coffee, but in gem list it was still listed and marked as default.
I created a symlink then - very hacky, but the only thing which worked for me:
ln -sf /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.0 /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1
The gem requesting bundler works now.

after entering 'bundle install' on command line I get "make sure that 'gem install json -v 1.8.2' succeeds before bundling"

I've been following this lynda tutorial online on 'Ruby on Rails.' I've downloaded Ruby, devkit and rails on to my computer. After I created sample_app and tried to run bundle install, but it keeps telling me make sure that 'gem install json -v 1.8.2' succeeds before bundling" I try to run gem install json -v 1.8.2 and other variations including "gem install json -v 1.8.2 --verbose", "gem install json --platform=ruby" but everytime I get an error saying that it failed to build gem native extensions. The same thing happened when I was following the downloading devkit tutorial and I tried to install JSON as per its instructions. I've tried using gem update system 2.3.0 but that doesn't work either. What could be wrong?
Typically this will happen on Windows because not all the commands are availible. I would recommended that you either use VirtualBox with an Ubuntu image or use Cloud9 IDE.
I just experienced the same problem myself. I am working my way from Windows to a Mac but not quite there just yet. Windows is ok for Rails development (been doing so for 3 years) although it does present some unique issues occasionally. Check out the following link to downgrade RubyGems to 1.8.29 and then try running bundle install again.
Issue with Ruby gem install

Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine

I started a new project named "blog"
and in the terminal i typed $cd blog
and then when i typed $rails server I got the error message
Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine.
What should I do?
I tried bundle install but it gives me a fatal error
I had installed ruby and rails via rvm, but without the libssl-dev package on ubunut 11.10. To remedy, I did the following:
sudo apt-get install libssl-dev
rvm remove 1.9.3 #or whatever your version of ruby is
rvm cleanup all
rvm install 1.9.3
cd to project directory
bundle install
Now I don't seem to be getting the error anymore

problem in installing rails

hi all i am getting problem while installing rails in by gem :
i have written in terminal
gem install rails
Successfully installed rails-3.0.3
1 gem installed
Installing ri documentation for rails-3.0.3...
File not found: lib
what i need to do next and how to install rails using gem.
I had the same problem. I continued with the error. I do not see anything breaking. And I can code peacefully. So, probably you do not need to worry.
sudo apt-get install build-essential libopenssl-ruby libfcgi-dev
sudo apt-get install ruby irb rubygems ruby1.8-dev
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install rails
sudo gem install sqlite3-ruby
If you dont find path do this: (for Unix based systems)
Quoted from the book, but anyone else would suggest the same
If you can’t find the rails command, you may need to add
/var/lib/gems/1.8/bin to your PATH environment variable.
You can do this by adding a line to your .bashrc file:
export PATH=/var/lib/gems/1.8/bin:$PATH
OK as aditya sanghi has mentioned, I do lack rdoc gem-- so probably running this will help
gem install rdoc rails
I've seen this error when you dont have the "rdoc" gem installed. Can you do a "gem list" and show us a list of gems installed?
Try running "gem install rdoc rails".

Resources