Closed harshith30 closed 10 years ago
Can you try installing the ruby development headers and then run bundle again.
sudo yum install ruby-devel
Hi,
I did as you suggested , it solved the mysql2 installation.
But i encountered few more errors this time.
[harshith@localhost testcasedb]$ bundle install
Fetching source index from http://rubygems.org/
Using rake (10.1.0)
.
.
Installing pdf-reader (1.3.3)
Installing pg (0.17.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-pg
--without-pg
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/
Gem files will remain installed in /home/harshith/.gem/ruby/gems/pg-0.17.0 for inspection.
Results logged to /home/harshith/.gem/ruby/gems/pg-0.17.0/ext/gem_make.out
An error occurred while installing pg (0.17.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.0'` succeeds before bundling.
If there is any need for additional information , i would be happy to provide them.
Thanks Harshith
This is another missing development header. Please run the following:
yum install /usr/include/libpq-fe.h
I will also review the documentation and add this in.
Hi,
That solved creation of bundle successfully.
[harshith@localhost testcasedb]$ bundle install
Using rake (10.1.0)
Using Ascii85 (1.0.2)
.
.
Using therubyracer (0.11.4)
Using uglifier (2.1.2)
Your bundle is complete!
Use bundle show [gemname]
to see where a bundled gem is installed.
But when i try to run ` rails server ` it generates another set of statements with (Errno::ENOENT)
[harshith@localhost testcasedb]$ rails server
/home/harshith/testcasedb/config/application.rb:4:in `read': No such file or directory - /home/harshith/testcasedb/config/app_config.yml (Errno::ENOENT)
from /home/harshith/testcasedb/config/application.rb:4:in `<top (required)>'
from /home/harshith/.gem/ruby/gems/railties-3.2.14/lib/rails/commands.rb:53:in `require'
from /home/harshith/.gem/ruby/gems/railties-3.2.14/lib/rails
/commands.rb:53:in block in <top (required)>' from /home/harshith/.gem/ruby/gems/railties-3.2.14/lib/rails/commands.rb:50:in
tap'
from /home/harshith/.gem/ruby/gems/railties-3.2.14/lib/rails /commands.rb:50:in <top (required)>' from script/rails:6:in
require'
from script/rails:6:in `
[harshith@localhost testcasedb]$
You're missing the app_config.yml file. There is a sample
A sample is located in config/emamples and should be copied to the config folder.
Out of interest, are you following the instructions in the PDF or the readme? Knowing this willl help me update the problematic instructions.
Hi , yes I'm following the instructions given in the admin_guide.pdf and what caused those error were i misses a couple of "required packages" during the process of installation and also my ruby and gems were not properly configured, did some research myself and fixed them.
[harshith@localhost ~]$ which ruby
/usr/local/bin/ruby
[harshith@localhost ~]$ which gem
/usr/local/bin/gem
[harshith@localhost ~]$ gem env | grep 'RUBY EXECUTABLE'
- RUBY EXECUTABLE: /usr/local/bin/ruby
[harshith@localhost ~]$
Currently i'm facing Rake assert error when i try to "prepare the assert pipeline"
$rake assets:precompile RAILS_ENV=”production”
[harshith@localhost tcdb]$ script/setup -p
Updated secret key
Migrating production database
Installing base function
[harshith@localhost tcdb]$ rake db:migrate RAILS_ENV="production" --trace
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump
[harshith@localhost tcdb]$ rake assets:precompile RAILS_ENV="production" --trace WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/usr/local/bin/ruby /usr/local/bin/rake assets:precompile:all RAILS_ENV=production
RAILS_GROUPS=assets --trace WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
'fontawesome.less' wasn't found.
(in /home/harshith/tcdb/tcdb/app/assets/stylesheets/bootstrap_and_overrides.css.less)at less.Parser.parser.parse.i (/usr/local/lib/ruby/gems/1.9.1/gems/less- 2.3.2/lib/less/js/lib/less/parser.js:426:69)
/usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/parser.rb:100:in block in to_css' /usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/java_script/v8_context.rb:90:in
block in do_lock'
/usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/java_script/v8_context.rb:88:in call' /usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/java_script/v8_context.rb:88:in
Locker'
/usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/java_script/v8_context.rb:88:in do_lock' /usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/java_script/v8_context.rb:60:in
lock'
/usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/java_script/v8_context.rb:30:in exec' . . ./usr/local/lib/ruby/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in
<top (required)>'
/usr/local/bin/rake:23:in load' /usr/local/bin/rake:23:in
If you need any additional information , i'm happy to provide them.
Thanks Harshith
I think you should do as below,
$ bundle exec rake assets:precompile RAILS_ENV=”production”
That is correct. I will get those instructions updated.
Hi , I did try both the ways but the result were same.
[harshith@localhost tcdb]$ script/setup -p
Updated secret key
Migrating production database
Installing base function
[harshith@localhost tcdb]$ bundle exec rake db:migrate RAILS_ENV="production" --trace
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1 * Invoke db:migrate (first_time) * Invoke environment (first_time) * Execute environment * Invoke db:load_config (first_time) * Execute db:load_config * Execute db:migrate * Invoke db:_dump (first_time) * Execute db:_dump * Invoke db:schema:dump (first_time) * Invoke environment * Invoke db:load_config * Execute db:schema:dump
[harshith@localhost tcdb]$ bundle exec rake assets:precompile RAILS_ENV="production" --trace
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1 * Invoke assets:precompile (first_time) * Execute assets:precompile
/usr/local/bin/ruby /usr/local/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1 * Invoke assets:precompile:all (first_time) * Execute assets:precompile:all * Invoke assets:precompile:primary (first_time) * Invoke assets:environment (first_time) * Execute assets:environment * Invoke environment (first_time) * Execute environment * Invoke tmp:cache:clear (first_time) * Execute tmp:cache:clear * Execute assets:precompile:primary rake aborted! 'fontawesome.less' wasn't found.
(in /home/harshith/tcdb/tcdb/app/assets/stylesheets/bootstrap_and_overrides.css.less)at less.Parser.parser.parse.i (/usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/js/lib/less/parser.js:426:69)
/usr/local/lib/ruby/gems/1.9.1/gems/less-2.3.2/lib/less/parser.rb:100:in block in to_css' . . . /usr/local/lib/ruby/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in
<top (required)>'
/usr/local/bin/rake:23:in load' /usr/local/bin/rake:23:in
Command failed with status (1): [/usr/local/bin/ruby /usr/local/bin/rake as...]
/usr/local/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_utils.rb:55:in block in create_shell_runner' /usr/local/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in
call'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in sh' . . . /usr/local/lib/ruby/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in
<top (required)>'
/usr/local/bin/rake:23:in load' /usr/local/bin/rake:23:in
so what should i do to fix this issue .
Thanks Harshith
Hi, some additional information regarding versions of software packages .
[harshith@localhost tcdb]$ rake --version
rake, version 10.1.0
[harshith@localhost tcdb]$ ruby --version
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-linux]
[harshith@localhost tcdb]$ gem --version
1.8.23.2
[harshith@localhost tcdb]$ mysql --version
mysql Ver 15.1 Distrib 5.5.37-MariaDB, for Linux (x86_64) using readline 5.1
[harshith@localhost ~]$ which ruby
/usr/local/bin/ruby
[harshith@localhost ~]$ which gem
/usr/local/bin/gem
[harshith@localhost ~]$ gem env | grep 'RUBY EXECUTABLE'
- RUBY EXECUTABLE: /usr/local/bin/ruby
Thanks Harshith
I'm closing this as the bundler issue got resolved.
Hi , i'm new to Ruby on Rails , when ever i try to run
bundle install
i get the following errorGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Results logged to /home/harshith/.gem/ruby/gems/mysql2-0.3.13/ext/mysql2/gem_make.out
System Details : Operating System - Fedora 20 Ruby version - ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-linux]
Other Information : -> Ruby was installed by
Building from Source
as instructed in https://www.ruby-lang.org/en/installation/-> Rails and gems were installed as $ sudo yum install rubygems rubygem-rails
Thanks Harshith