Installing Ruby on Rails for OSX - Issues - ruby-on-rails

I am having trouble installing Ruby on Rails on OSX. I have gotten as far as too install the Rails, and have it create the application skeleton but when I go to run the server to test it's all working I get this:
Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile.
sqlite is in the gem folder/list:
* LOCAL GEMS *
sqlite3-ruby (1.2.4)
Any idea?

Found out solution was here:
http://www.ruby-forum.com/topic/1074909

Related

Ruby - Install Sinatra gem error on ruby mine

I'm working on a new project in Ruby, which I'm learning, and I need to install Sinatra gem and I'm getting the following error:
"Following gems were not installed: sinatra-sinatra (0.10.1): While
executing gem ... (Gem::UnsatisfiableDependencyError)
Unable to resolve dependency: 'sinatra-sinatra (= 0.10.1)' requires 'rack (>= 1.0)'"
Currently I'm using, RubyMine (Windows). Any help would be appreciated.
Thanks
The problem is not RubyMine, but some other dependency conflict in your app. The gem sinatra-sinatra requires Rack 1.0, there is probably another gem in your Gemfile that requires a greater or different version of the same gem.
Actually, I believe your problem can easily be fixed by using the proper gem. sinatra-sinatra is a very old gem, if you want to use the Sinatra framework the correct gem is sinatra. Update your Gemfile accordingly.
In you machine
gem install sinatra-sinatra
Check you Gemfile
gem 'sinatra-sinatra', '~> 0.10.1'
Delete the Gemfile.lock and bundle its once again.

Rails - Command "bundle install" can't fetch gems

I always get an error when trying to install all gems of a given app.
$ bundle install --verbose --retry 4
Fetching from: https://bundler.rubygems.org/api/v1/dependencies
Fetching source index from https://rubygems.org/
Resolving dependencies...Fetching from: https://rubygems.org/quick/Marshal.4.8/sass-rails-4.0.3.gemspec.rz
Network error while fetching https://rubygems.org/quick/Marshal.4.8/sass-rails-4.0.3.gemspec.rz
I can fetch the file manually via wget or a web browser, so the network is not an issue !
Installing via the gem command works too but that's a pain.
Can someone help me on this one ? I'm clueless to what could be happening here
I am newbie, learning RoR, Running Mavericks, Trying it using RVM, Ruby version 2.1.2, Rails 4.1.4
When I tried running $ rails server, I was getting the below errors
and I have tried this being in my rails app folder
Network error while fetching
https://rubygems.org/quick/Marshal.4.8/sass-rails-4.0.3.gemspec.rz
$ gem install spring
Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine.
$ gem install jquery-rails
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
$ gem install sqlite3
Could not find gem 'sass-rails (~> 4.0.3) ruby' in the gems available on this machine.
$ gem install sass-rails
And for other errors like above I did install them one by one
I couldn't find any solution over the internet, even my system gems are updated. Then as a last resort I did this, installing them one by one.
And it started working

Ruby on Rails configuration gem difficulty

Ruby on Rails newbie configuration issue:
I screwed up my rails configuration by running "gem install pg". Now when I try to do a bundle install I get this error:
/usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'pg (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
And if I try to reinstall pg gem, I get this:
Any help is appreciated. Thanks!
Do you have Postgres installed and working correctly? The heroku supplied app is the most painless way to it if you havent.

Rails can't find exception_notification gem even though I have it installed

I recently installed the exception_notification plugin/gem (I'm confused as to whether it's properly install as a plugin or as a gem) and I'm getting this:
Could not find exception_notification-2.4.1 in any of the sources (Bundler::GemNotFound)
This is in spite of the fact that I already have that version of the gem installed:
$ gem list | grep exception_notification
exception_notification (2.5.2, 2.4.1)
Any ideas?
Maybe you're using a vendored bundle?
If so, it sounds like you just need to run
bundle install
In your rails directory. (Assuming you've already added that gem to your Gemspec).
http://gembundler.com/rails3.html

Installing gems tutorial

Is there anywhere that there are step by step instructions on how to install gems?
My google-fu is weak and those that I could find did not resolve my error.
My errors are detailed here:
Getting gcal4ruby gem to work
Basically my error sums up as:
gem installs properly and is detectable by,
but whenever I try to reference it in my application it just says:
Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources Try running 'bundle install'.
(* I tried bundle install -> no help *)
Your error states:
Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources Try running 'bundle install'.
It's looking for 0.0.5 of gcal4ruby, which you don't have installed, rather you're saying yourself that the gem list -d shows:
gcal4ruby (0.5.5)
Which is not the correct version. I would recommend attempting to discover what's trying to require this older version of gcal4ruby. I think it's in your Gemfile, but I have been known to be wrong occasionally.
If this answer doesn't solve your question, then please attach the errors you're getting and your Gemfile to your question.
As a guess, you are using rails 3? Rails 3 uses a project called bundler for dependencies, so instead of installing the gem in your system ruby, add gem 'gcal4ruby to the Gemfile in the root of your app. after that, a bundle install will install the gem locally into your app.
Bundler means that rails 3 apps have their gems completely isolated from the system gems. Even if the gem is installed in the system, it will not be accessible in the app.

Resources