How to fix [metasploit] error: block in materialize': Could not find pg-0.17.1 in any of the sources (Bundler::GemNotFound) - bundler

I am pretty new to this. Im trying to launch metasploit framework on a Mac osx 10.9.5.
block in materialize': Could not find pg-0.17.1 in any of the sources (Bundler::GemNotFound)
every time is use ./msfconsole thats what comes up.
How to fix this?

Try to install pg separatly: gem install pg -v '0.17.1'

Related

`default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)

I am new to the ruby on merb, using ruby 1.8.7 version. while run the app it showing like this
`default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)
from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374#global/gems/bundler-1.5.3/lib/bundler.rb:242:in `default_gemfile'
from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374#global/gems/bundler-1.5.3/lib/bundler.rb:188:in `root'
from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374#global/gems/bundler-1.5.3/lib/bundler.rb:98:in `bundle_path'
from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374#global/gems/bundler-1.5.3/lib/bundler.rb:395:in `configure_gem_home_and_path'
from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374#global/gems/bundler-1.5.3/lib/bundler.rb:89:in `configure'
from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374#global/gems/bundler-1.5.3/lib/bundler.rb:150:in `definition'
from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374#global/gems/bundler-1.5.3/lib/bundler.rb:115:in `setup'
from /usr/bin/merb:10
when i am trying to install ' rvm rubygems 1.4.2 ' it shows followed message like
Installed rubygems 2.0.14 is newer then 1.4.2, skipping installation, use --force to force installation'
This is to request you to provide the solution at the earliest possible. Please help me.
Thanks in advance
If you are new to Ruby you shouldn't use 1.8.7. Its no longer supporter and you will run into problems beyond the one you are having right now. Upgrade to Ruby 2.1.1:
rvm get stable
rvm install 2.1.1
Then locate your project and install your gems by running:
bundle install
I was having this issue trying to get TextMate 2 working with the Cucumber bundle from
https://github.com/cucumber/cucumber-tmbundle
I'm using rvm integration with TM_RUBY set to my .rvm/bin/rvm_auto_ruby, but the cucumber not be resolved. I ended up hard coding BUNDLE_GEMFILE and GEM_HOME into the 'Run Feature' and 'Run Single Scenario' commands:
ENV['BUNDLE_GEMFILE'] = ENV['TM_PROJECT_DIRECTORY'] + '/Gemfile'
ENV['GEM_HOME'] = '/Users/my/.rvm/gems/ruby-1.9.3-p448#monaco-mongoid3'
Anyways, hope that helps someone else.

cannot load such file --zlib

Ruby & Rails beginner here! Attempting to code out of my iPad 3rd gen using iSSH, Digital Ocean Server (using Ubuntu 12.10), DropBox, and Textastic editor. (There is always somebody trying to ice skate uphill!)
In my installation of Ruby I am following these directions: https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-from-source
When I do step 3: sudo gem update --system
ERROR: Loading command: update (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::UpdateCommand
I've seen some posts that talk about RVM. Do I need to uninstall everything and start over with RVM? If so do I just delete the directory or is there an uninstall command for Ruby? Do I need to uninstall the libraries? How?
Any and all help is greatly appreciated.
try installing zlib package if you are using RVM.
https://rvm.io/packages/zlib/
rvm pkg install zlib
and reinstall all your rubies

Running a program that needs a package's old version

I want to run a program with a demo of oauth which gives this error:
/Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/spec_set.rb:88:in `materialize': Could not find crack-0.1.8 in any of the sources (Bundler::GemNotFound)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `map!'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `materialize'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:152:in `specs_for'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:141:in `requested_specs'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/environment.rb:23:in `requested_specs'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/runtime.rb:11:in `setup'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler.rb:110:in `setup'
from example.rb:2
I found running it needs crack-0.1.8. When I ran gem list, I found the crack version in my computer is 0.3.1, so how can I solve this problem? (The new version is not compatible with the old version? I am confused.)
Just specify version of this gem in Gemfile
gem crack, '0.1.8'
Run bundle install, which will install the correct versions of all the Gems needed, as specified in the Gemfile. It should run okay after that.
Crack 0.1.8 is available at rubygems.org:
Crack at rubygems.org
Crack 0.1.8 at rubygems.org
With
gem install crack -v 0.1.8
it should be possible to install the version you need.

Running padrinorb after installing says "Could not find padrino-core"

EDIT:
False alarm.
I was able to resolve the issue. Apparently I was to sudo happy and that broke the install of the gem.
I had to gem uninstall padrino, then gem install padrino.
Now it works flawlessly.
BTW, padrinorb is shaping up to be a nice balance between Sinatra and Rails.
// original post below:
Not sure what I did wrong.
I'm trying to test out Padrino, however I'm running into an issue straight away.
I'm following the steps starting with sudo gem install padrino adding sudo for good measure.
Then following along I did padrino g project myapp -d datamapper -b as their site states.
The problem is that it returns an error, so I decided to just run padrino as is with no args.
Error as well (it's long):
$ padrino
/Users/viper1092/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find padrino-core (>= 0) amongst [RedCloth-4.2.9, RedCloth-4.2.8, actionmailer-3.2.3, actionpack-3.2.3, activemodel-3.2.3, activerecord-3.2.3, activeresource-3.2.3, activesupport-3.2.3, addressable-2.2.7, albino-1.3.3, arel-3.0.2, blankslate-2.1.2.4, builder-3.0.0, bundler-1.1.3, bundler-1.0.22, chunky_png-1.2.5, chunky_png-1.2.1, classifier-1.3.3, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.3.1, compass-0.12.1, compass-0.11.5, crack-0.1.8, daemons-1.1.3, directory_watcher-1.4.1, directory_watcher-1.4.0, erubis-2.7.0, eventmachine-0.12.10, execjs-1.3.0, faraday-0.7.6, fast-stemmer-1.0.1, fast-stemmer-1.0.0, ffi-1.0.11, ffi-1.0.9, fssm-0.2.9, fssm-0.2.7, haml-3.1.4, haml-3.1.2, heroku-2.24.1, heroku-2.20.1, hike-1.2.1, httparty-0.7.8, i18n-0.6.0, jekyll-0.11.2, jekyll-0.11.0, journey-1.0.3, jquery-rails-2.0.2, json-1.6.6, json-1.5.4, koala-1.3.0, kramdown-0.13.5, kramdown-0.13.3, launchy-2.1.0, launchy-2.0.5, liquid-2.3.0, liquid-2.2.2, mail-2.4.4, maruku-0.6.0, mime-types-1.18, mime-types-1.17.2, multi_json-1.2.0, multi_json-1.0.3, multipart-post-1.1.5, netrc-0.7.1, polyglot-0.3.3, posix-spawn-0.3.6, pygments.rb-0.2.11, pygments.rb-0.1.3, rack-1.4.1, rack-1.3.2, rack-cache-1.2, rack-protection-1.2.0, rack-ssl-1.3.2, rack-test-0.6.1, rails-3.2.3, railties-3.2.3, rake-0.9.2.2, rake-0.9.2, rb-fsevent-0.9.1, rb-fsevent-0.4.3.1, rdiscount-1.6.8, rdoc-3.12, rest-client-1.6.7, rubypants-0.2.0, rubypython-0.5.3, rubypython-0.5.1, rubyzip-0.9.7, rubyzip-0.9.6.1, sass-3.1.15, sass-3.1.5, sass-rails-3.2.5, sinatra-1.3.2, sinatra-1.2.6, sprockets-2.1.2, sqlite3-1.3.5, stringex-1.3.2, stringex-1.3.0, syntax-1.0.0, term-ansicolor-1.0.7, thin-1.2.11, thor-0.14.6, tilt-1.3.3, tilt-1.3.2, treetop-1.4.10, tzinfo-0.3.33, uglifier-1.2.4] (Gem::LoadError)
from /Users/viper1092/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/viper1092/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
from /Users/viper1092/.rvm/rubies/ruby-1.9.2-p290/bin/padrino:18:in `<main>'
Then if I take a look at gem list:
$ gem list
*** LOCAL GEMS ***
polyglot (0.3.3)
posix-spawn (0.3.6)
pygments.rb (0.2.11, 0.1.3)
Those are the only "p"s I have.
When I ran sudo gem install padrino initially:
Successfully installed padrino-mailer-0.10.6
Successfully installed bundler-1.1.3
Successfully installed padrino-gen-0.10.6
Successfully installed padrino-cache-0.10.6
Successfully installed padrino-admin-0.10.6
Successfully installed padrino-0.10.6
21 gems installed
I'm on Mac OS X 10.7.3 running RVM 1.10.2 with ruby 1.9.2 selected.
I've tried just gemming Padrino 3 times as gem install padrino with no sudo just for fun and it reports that it installs, but padrino (with or without args) fails with same error. Again, running gem list does not mention padrino or padrino-core.
Any advice?
(I have the full verbosity and it's quite lengthy)
I was able to resolve the issue. Apparently I was to sudo happy and that broke the install of the gem.
I had to gem uninstall padrino, then gem install padrino.
Now it works flawlessly.
I suppose sudo installing changes some system-wide /usr deal, idk.
Thanks if you looked over my question.
BTW, padrinorb is shaping up to be a nice balance between Sinatra and Rails.

Rake failing to start

I'm having trouble understanding the following error with Ruby's Rake.
C:\>gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7...
Installing RDoc documentation for rake-0.8.7...
C:\>rake
C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can't find executable r
ake for rake-0.8.7 (Gem::Exception)
from C:/Ruby192/bin/rake:19:in `<main>'
Running Ruby 1.9.2 for Windows.
Edit: Installing from source yields:
C:\Documents and Settings\XPherior\Desktop\rake-0.8.7\rake-0.8.7>ruby install.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
ftools (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from install.rb:3:in `<main>'
The second error, where you have installed into C:\Documenets And Settings\ is occurring because you cannot install ruby into a folder with a space in the path. It should be installed into c:\Ruby\ c:\Ruby#.#.#\ if you want the version # in the path, or something along those lines.
for the first error: there is a bug in the rubyinstaller.org version of ruby 1.9.2, which is causing this by running "gem install rake".
you can read about the error you're getting, here: http://redmine.ruby-lang.org/issues/show/3677
there are a couple of ways to fix this error:
re-install ruby v1.9.2 and don't run "gem install rake". rake v0.8.7 is built into the ruby v1.9.2 installation, so you don't need to re-install it.
if you do want to manually install it, you can delete the ruby.gempspec file from your ruby installation. this file is located at (rubyinstalldir)\lib\ruby\gems\1.9.1\specifications
either of these options will fix the problem for you.
i'm not sure which is "better" off-hand... it may be necessary to delete the gemspec file and reinstall rake, to support updates and new versions in the future. i'm not sure, though. we'll find out once rake is updated and we need to install a new version. or, perhaps, the issue will be fixed in the ruby installation by then, and we'll just need to update our ruby install.
I've run into your both errors.
For the first one. Try the solution post at here http://betterlogic.com/roger/2010/11/ruby-1-9-2-rake-woe/.
And for the second error, it's causes by a library update by the ruby 1.9. From the Programming Ruby 1.9, "ftools have been removed (and replaced by fileutils)." I'm not pretty sure but at least that's an explanation.

Resources