Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup MacOS 10.10 Yosemite Discussion

Chris Oliver asked in General
Bryan Frederick Kelley Galindo Bryan Frederick Kelley Galindo

this is another error i cant fix help please
Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

Reply
Aurovrata Venet Aurovrata Venet

Very good notes, I got stuck trying to intsall rails due to libxml2 being already installed on my machine...so had to google some compile flags.(http://stackoverflow.com/qu...

Reply

rake db:create gives the error, Could not find json-1.8.3 in any of the sources

Run `bundle install` to install missing gems.. I included json-1.8.3 in gemfile, and then did bundle install. After that gem list json gives --

*** LOCAL GEMS ***

json (1.8.1)

then rake db:create fails again with the same error. What should I do?

Reply
Dillon Wernicki Dillon Wernicki

have tried installing a few different ways and always end up with the error : .rbenv/versions/2.2.3/lib/ruby/2.2.0/socket.rb:232:in `getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError)
(on El Capitan) Any thoughts?

Reply

Great!!

Thanks a lot for very very well guidance.
For some reasons to install ssh key, please refer also this: https://help.github.com/art....
This guidance is 98 out of 100 point...

Thanks again.
Nyoman, Bali, Indonesia

Reply

I Installed Rails With No Problem, But Now It Disappears. Why?

I followed the guidance carefully and I successfully installed: Homebrew, Ruby, Git, Rails, and Setting Up Database.

I tried them by creating some testing apps with no problem, I went to bed, and left my computer on for downloading Xcode.

But the next morning, when wanted to practice using them, I found rails is no longer in my computer. Here is what it says:

ings-Mac:~ ing$ ruby -v

ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]

ings-Mac:~ ing$ rails -v

Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

NOTE:

I made another installation of rails with:

$ sudo gem install rails (with no problem)

It installed Rails 4.2.5.

I made some testing with and without mysql. It DONE WELL.

Will rails disappear again? Let see...

Oh yeh, there are similar problems in Stackoverflow...

Reply

thanks for this! New computer, quickest I've ever set up!

Reply

On running the command rake db:create getting following message.

Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost", "database"=>"myapp_development"}

Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost", "database"=>"myapp_test"}

rake aborted!

Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

Gem::LoadError: can't activate mysql2 (~> 0.3.13), already activated mysql2-0.4.2. Make sure all dependencies are added to Gemfile.

Tasks: TOP => db:create

(See full trace by running task with --trace)

Any suggestions?

Reply
Mithilesh Izardar Mithilesh Izardar

I am getting some conflict error

Reply
Nicholas Blasgen Nicholas Blasgen

`sudo brew upgrade --HEAD ruby-build`

Turns out I already had an outdated version, so I had to upgrade in order to make anything work. As the upgrade has no downside, I suggest adding it to the article just to ensure that the person is running the most recent version.

Reply
Subrotho Bagchi Subrotho Bagchi

I am getting this error after this step
\Subratha$echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
\Subratha$source ~/.bash_profile
-bash: rbrenv: command not found
\Subratha$ source ~/.bash_profile
-bash: rbrenv: command not found
\Subratha$~/.bash_profile
-bash: /Users/tinabagchi/.bash_profile: Permission denied
\Subratha$

Reply
Subrotho Bagchi Subrotho Bagchi

please help I am stuck after this command
$ source ~/.bash_profile
says command not found

I tried
$~/.bash_profile

says $ -bash: /Users/tinabagchi/.bash_profile: Permission denied

What can I do????

Reply
Nicholas Tillman Nicholas Tillman

Got build failed error when trying to install 2.2.3 with rbenv. Any suggestions?

Reply

Awesome tutorial....thanks

Reply
natasha kelly natasha kelly

Hello, I know this post is extremely old but I just attempted to download the packages. I ran into trouble with the git conversion and the PostreSQL install. Please advise

Reply

best article on the net for this!!! Thank you Railsgirls...

Reply
Jessica Pamanian Jessica Pamanian

I tried installing Ruby on Rails through Railsbridge Installfest, got very stuck and found this site instead. I was able to view my new website, however in order to do so I had to overwrite a bunch of stuff: .gitignore, Gemfile, bin/rails, bin/rake, config/secrets.yml, config/database.yml. I'm very new to this and have no real clue what I've done and fear that in the future rails won't work and that it will have something to do with this.

What did I do? Is this good or bad? Thank you!

Reply

As long as you followed all these instructions you should be fine. It sounds like you overwrote files inside a Rails app which should be fine. You can always try creating a new Rails app and seeing if that works. Then you'll know you're setup correctly.

Reply
Paul Dumanig Paul Dumanig

I got this error all the time:

ERROR: Error installing rails:
invalid gem: package content (data.tar.gz) is missing in /Users/paul/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/cache/rack-1.4.7.gem

Reply
Katherine Rosenkranz Katherine Rosenkranz

thank you! I don't know why the rest of the internet can't be so helpful

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,584+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.