Python: the linecache module is so wonderful!! linecache.getline() - so helpful!!
seen from United States
seen from Canada
seen from China
seen from Türkiye
seen from Japan
seen from South Korea
seen from Türkiye
seen from South Korea

seen from United Kingdom
seen from United States
seen from Australia
seen from Russia
seen from United States
seen from Spain

seen from Canada
seen from China

seen from Australia
seen from Sweden

seen from United Kingdom

seen from Canada
Python: the linecache module is so wonderful!! linecache.getline() - so helpful!!
Fixing the linecache 0.45 issue under Ruby 1.8.7
June 11th there was an update to the linecache gem the starts pitching an error about require_relative. Adding require_relative or something similar to below fixes the issue. I attempted to lock the linecache gem down to the 0.43 but was getting different errors in my project.
if RUBY_VERSION < "1.9" gem 'require_relative' gem "ruby-debug" else gem "ruby-debug19" end
linecache nonsense
I have taken an old ubuntu machine out of hibernation and am trying to clone a github project of mine onto it to continue development but am running into some problems i have cloned my project down from github no problem i go into the folder and just to check i try to see what version of rails is there:
toast@buntubox:~/ruby/rails_projects/onebag$ rails -v Could not find linecache19-0.5.11 in any of the sources
Try running `bundle install`. so i take its advice and try running bundle install
... Installing linecache19 (0.5.11) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:533:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) ;/usr/bin/ruby1.8 extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. OK... i guess i should have checked the ruby version first as well: toast@buntubox:~$ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
ok so its off to RVM to try to install Ruby 1.9.2 - why RVM? I'm not sure, but the internet pretty much agrees that RVM should be used so who am i to argue.
$ rvm install ruby-1.9.2
and then bundle install, which unfortunatly crashed with the following:
Using ruby_core_source (0.1.4) Installing linecache19 (0.5.11) with native extensions /home/toast/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /home/toast/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/toast/.rvm/rubies/ruby-1.9.2-p180/bin/ruby /home/toast/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
we can see at the bottom what the problem is - not loading openssl, this should have been installed with ruby but for some reason not, so we have to:
$ rvm remove 1.9.2 $ rvm package install openssl $ rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr
and this finally seemed to do the trick - on to my rake db:migrate issues. More info on RVM and openssl here http://rvm.beginrescueend.com/packages/openssl/