Problems while creating a new project in rails

console:

root@cristiano:/home/cristiano/src/rails_4_app_dev# rails new
food_recipe_share -d mysql
exist
identical README.rdoc
identical Rakefile
identical config.ru
identical .gitignore
identical Gemfile
exist app
identical app/assets/javascripts/application.js
identical app/assets/stylesheets/application.css
identical app/controllers/application_controller.rb
identical app/helpers/application_helper.rb
identical app/views/layouts/application.html.erb
identical app/assets/images/.keep
identical app/mailers/.keep
identical app/models/.keep
identical app/controllers/concerns/.keep
identical app/models/concerns/.keep
exist bin
identical bin/bundle
identical bin/rails
identical bin/rake
exist config
identical config/routes.rb
identical config/application.rb
identical config/environment.rb
conflict config/secrets.yml
Overwrite
/home/cristiano/src/rails_4_app_dev/food_recipe_share/config/secrets.yml?
(enter “h” for help) [Ynaqdh]
force config/secrets.yml
exist config/environments
identical config/environments/development.rb
identical config/environments/production.rb
identical config/environments/test.rb
exist config/initializers
identical config/initializers/assets.rb
identical config/initializers/backtrace_silencers.rb
identical config/initializers/cookies_serializer.rb
identical config/initializers/filter_parameter_logging.rb
identical config/initializers/inflections.rb
identical config/initializers/mime_types.rb
identical config/initializers/session_store.rb
identical config/initializers/wrap_parameters.rb
exist config/locales
identical config/locales/en.yml
identical config/boot.rb
identical config/database.yml
exist db
identical db/seeds.rb
exist lib
exist lib/tasks
identical lib/tasks/.keep
exist lib/assets
identical lib/assets/.keep
exist log
identical log/.keep
exist public
identical public/404.html
identical public/422.html
identical public/500.html
identical public/favicon.ico
identical public/robots.txt
exist test/fixtures
identical test/fixtures/.keep
exist test/controllers
identical test/controllers/.keep
exist test/mailers
identical test/mailers/.keep
exist test/models
identical test/models/.keep
exist test/helpers
identical test/helpers/.keep
exist test/integration
identical test/integration/.keep
identical test/test_helper.rb
exist tmp/cache
exist tmp/cache/assets
exist vendor/assets/javascripts
identical vendor/assets/javascripts/.keep
exist vendor/assets/stylesheets
identical vendor/assets/stylesheets/.keep
run bundle install
Fetching gem metadata from https://rubygems.org/
Resolving dependencies…
Using rake (10.3.2)
Using i18n (0.6.11)
Using json (1.8.1)
Using minitest (5.4.1)
Using thread_safe (0.3.4)
Using tzinfo (1.2.2)
Using activesupport (4.1.5)
Using builder (3.2.2)
Using erubis (2.7.0)
Using actionview (4.1.5)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.1.5)
Using mime-types (1.25.1)
Using polyglot (0.3.5)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.1.5)
Using activemodel (4.1.5)
Using arel (5.0.1.20140414130214)
Using activerecord (4.1.5)
Using bundler (1.3.5)
Using coffee-script-source (1.8.0)
Using execjs (2.2.1)
Using coffee-script (2.3.0)
Using thor (0.19.1)
Using railties (4.1.5)
Using coffee-rails (4.0.1)
Using hike (1.2.3)
Using multi_json (1.10.1)
Using jbuilder (2.1.3)
Using jquery-rails (3.1.2)
Installing mysql2 (0.3.16)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

    /usr/bin/ruby1.9.1 extconf.rb

checking for ruby/thread.h… no
checking for rb_thread_blocking_region()… yes
checking for rb_wait_for_single_fd()… yes
checking for rb_hash_dup()… yes
checking for rb_intern3()… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lm… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lz… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lsocket… no
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lnsl… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lmygcc… no
checking for mysql_query() in -lmysqlclient… no
*** 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=/usr/bin/ruby1.9.1
–with-mysql-dir
–without-mysql-dir
–with-mysql-include
–without-mysql-include=${mysql-dir}/include
–with-mysql-lib
–without-mysql-lib=${mysql-dir}/lib
–with-mysql-config
–without-mysql-config
–with-mysql-dir
–without-mysql-dir
–with-mysql-include
–without-mysql-include=${mysql-dir}/include
–with-mysql-lib
–without-mysql-lib=${mysql-dir}/lib
–with-mysqlclientlib
–without-mysqlclientlib
–with-mlib
–without-mlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-zlib
–without-zlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-socketlib
–without-socketlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-nsllib
–without-nsllib
–with-mysqlclientlib
–without-mysqlclientlib
–with-mygcclib
–without-mygcclib
–with-mysqlclientlib
–without-mysqlclientlib

Gem files will remain installed in
/var/lib/gems/1.9.1/gems/mysql2-0.3.16 for inspection.
Results logged to
/var/lib/gems/1.9.1/gems/mysql2-0.3.16/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.16), and Bundler cannot
continue.
Make sure that gem install mysql2 -v '0.3.16' succeeds before
bundling.
run bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with bundle install

On 6 September 2014 15:56, Cristiano D. [email protected] wrote:


Installing mysql2 (0.3.16)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

You are missing some dependencies required to build gems, but since
you have not told us which OS you are using it is difficult to make
recomendations. For example, on Ubuntu running the following will
likely get you going.

sudo apt-get install build-essential bison openssl libreadline6
libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev
libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake
libtool

That is all one line.
Then in the application top level folder run
bundle install
to fetch and build the gems

Colin

thanks and sorry for the missing info about wich SO i’m using. (Ubuntu
14).