{"id":6373,"date":"2014-04-17T01:13:10","date_gmt":"2014-04-17T01:13:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/17\/ruby-on-rails-server-doesnt-start-collection-of-common-programming-errors-2\/"},"modified":"2014-04-17T01:13:10","modified_gmt":"2014-04-17T01:13:10","slug":"ruby-on-rails-server-doesnt-start-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/17\/ruby-on-rails-server-doesnt-start-collection-of-common-programming-errors-2\/","title":{"rendered":"Ruby on Rails server doesn&#39;t start-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m currently working on a project that requires me to takeover an existing Ruby on Rails website and to finish it. I&#8217;m very new to this, and have some problems.<\/p>\n<p>I can&#8217;t even start the server from the terminal, I suspect it is a version related problem, since I&#8217;ve just configured my computer to work with Ruby on Rails, and the website development begun a year or two ago. If I create and work on a project myself, everything works fine. I&#8217;m on MacBook under OSX Mavericks.<\/p>\n<p>Here are some specifics:<\/p>\n<p>To start the server I go into the project directory with my terminal and type:<\/p>\n<pre><code>rails server\n<\/code><\/pre>\n<p>This command gives me the following error message:<\/p>\n<pre><code>\/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/lib\/ruby\/site_ruby\/2.1.0\/rubygems\/core_ext\/kernel_require.rb:55:in `require': cannot load such file -- bundler\/setup (LoadError)\nfrom \/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/lib\/ruby\/site_ruby\/2.1.0\/rubygems\/core_ext\/kernel_require.rb:55:in `require'\nfrom \/Users\/Davydov\/CodingSpace\/RubyWorkspace\/celliptic\/config\/boot.rb:6:in `'\nfrom \/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/lib\/ruby\/site_ruby\/2.1.0\/rubygems\/core_ext\/kernel_require.rb:55:in `require'\nfrom \/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/lib\/ruby\/site_ruby\/2.1.0\/rubygems\/core_ext\/kernel_require.rb:55:in `require'\nfrom script\/rails:5:in `'\n<\/code><\/pre>\n<p>I&#8217;ve of course looking around the internet about this problem, for a long time and somebody told to run this:<\/p>\n<pre><code>bundle install\n<\/code><\/pre>\n<p>If I understand well this reinstalls all the gems, and at the end I get an error message like that:<\/p>\n<pre><code>Gem::Ext::BuildError: ERROR: Failed to build gem native extension.\n\n\/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/bin\/ruby extconf.rb \nchecking for rb_thread_blocking_region()... yes\nchecking for rb_wait_for_single_fd()... yes\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lm... yes\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lz... yes\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lsocket... no\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lnsl... no\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lmygcc... no\nchecking for mysql_query() in -lmysqlclient... no\n*** extconf.rb failed ***\nCould not create Makefile due to some reason, probably lack of necessary\nlibraries and\/or headers.  Check the mkmf.log file for more details.  You may\nneed configuration options.\n\nProvided configuration options:\n--with-opt-dir\n--without-opt-dir\n--with-opt-include\n--without-opt-include=${opt-dir}\/include\n--with-opt-lib\n--without-opt-lib=${opt-dir}\/lib\n--with-make-prog\n--without-make-prog\n--srcdir=.\n--curdir\n--ruby=\/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/bin\/ruby\n--with-mysql-config\n--without-mysql-config\n--with-mysql-dir\n--without-mysql-dir\n--with-mysql-include\n--without-mysql-include=${mysql-dir}\/include\n--with-mysql-lib\n--without-mysql-lib=${mysql-dir}\/lib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-mlib\n--without-mlib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-zlib\n--without-zlib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-socketlib\n--without-socketlib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-nsllib\n--without-nsllib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-mygcclib\n--without-mygcclib\n--with-mysqlclientlib\n--without-mysqlclientlib\n\nextconf failed, exit code 1\n\nGem files will remain installed in \/Users\/Davydov\/CodingSpace\/RubyWorkspace\/celliptic\/vendor\/bundle\/ruby\/2.1.0\/gems\/mysql2-0.3.11 for inspection.\nResults logged to \/Users\/Davydov\/CodingSpace\/RubyWorkspace\/celliptic\/vendor\/bundle\/ruby\/2.1.0\/extensions\/x86_    64-darwin-12\/2.1.0-static\/mysql2-0.3.11\/gem_make.out\nAn error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.\nMake sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.\n<\/code><\/pre>\n<p>This error message suggests that I should run, and make sure this succeeds before bundling:<\/p>\n<pre><code>gem install mysql2 -v '0.3.11\n<\/code><\/pre>\n<p>And this is what I get:<\/p>\n<pre><code>Building native extensions.  This could take a while...\nERROR:  Error installing mysql2:\nERROR: Failed to build gem native extension.\n\n\/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/bin\/ruby extconf.rb\nchecking for rb_thread_blocking_region()... yes\nchecking for rb_wait_for_single_fd()... yes\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lm... yes\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lz... yes\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lsocket... no\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lnsl... no\nchecking for mysql_query() in -lmysqlclient... no\nchecking for main() in -lmygcc... no\nchecking for mysql_query() in -lmysqlclient... no\n*** extconf.rb failed ***\nCould not create Makefile due to some reason, probably lack of necessary\nlibraries and\/or headers.  Check the mkmf.log file for more details.  You may\nneed configuration options.\n\nProvided configuration options:\n--with-opt-dir\n--without-opt-dir\n--with-opt-include\n--without-opt-include=${opt-dir}\/include\n--with-opt-lib\n--without-opt-lib=${opt-dir}\/lib\n--with-make-prog\n--without-make-prog\n--srcdir=.\n--curdir\n--ruby=\/Users\/Davydov\/.rvm\/rubies\/ruby-2.1.0\/bin\/ruby\n--with-mysql-config\n--without-mysql-config\n--with-mysql-dir\n--without-mysql-dir\n--with-mysql-include\n--without-mysql-include=${mysql-dir}\/include\n--with-mysql-lib\n--without-mysql-lib=${mysql-dir}\/lib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-mlib\n--without-mlib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-zlib\n--without-zlib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-socketlib\n--without-socketlib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-nsllib\n--without-nsllib\n--with-mysqlclientlib\n--without-mysqlclientlib\n--with-mygcclib\n--without-mygcclib\n--with-mysqlclientlib\n--without-mysqlclientlib\n\nextconf failed, exit code 1\n\nGem files will remain installed in \/Users\/Davydov\/.rvm\/gems\/ruby-2.1.0\/gems\/mysql2-0.3.11 for inspection.\nResults logged to \/Users\/Davydov\/.rvm\/gems\/ruby-2.1.0\/extensions\/x86_64-darwin-12\/2.1.0-static\/mysql2-0.3.11\/gem_make.out\n<\/code><\/pre>\n<p>At this moment I&#8217;m stuck and don&#8217;t know what to do. All kind of help is appreciated.<\/p>\n<p>Cheers<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m currently working on a project that requires me to takeover an existing Ruby on Rails website and to finish it. I&#8217;m very new to this, and have some problems. I can&#8217;t even start the server from the terminal, I suspect it is a version related problem, since I&#8217;ve just configured my computer to work [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6373","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6373"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6373\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}