Hello every body am very new to this group.
i have some issue regarding Rails installation.Though i have installed Ruby,bundler etc i was trying to install rails using gem install rails command but there are some error like
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/home/prasanna/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20150914-3856-mtv6bq.rb extconf.rb
checking if the C compiler accepts ... *** 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=/home/prasanna/.rvm/rubies/ruby-2.2.3/bin/$(RUBY_BASE_NAME)
--help
--clean
so can any body please help me to tackle this..
PS.Tried -sudo apt-get install mkmf ,
gem install mkmf
build essential command etc..so please help me to get rid of these..
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/000e21cf-421f-488a-93b6-0d0da43addb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Install gcc, it's obvious by just looking at which point mkmf cancels... Probably you will stumble over more missing development packages after that, but let's make one step after the other.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/000e21cf-421f-488a-93b6-0d0da43addb4%40googlegroups.com.
Install gcc, it's obvious by just looking at which point mkmf cancels... Probably you will stumble over more missing development packages after that, but let's make one step after the other.
OK, I have taken a closer look into the posted screenshot. It seems to happen when installing nokogiri, what were the names of the development headers it depends on?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLufc%3DyH0YgGSzRXYMA0SdFn_PWJhwmPU9f08LzJkeONLw%40mail.gmail.com.
Hello sorry @colin .i am a new one to this forum as well as ruby so if any mistake made by me then i am sorry.
well the output of $ apt-cache policy gcc is
gcc:
Installed: 4:4.8.2-1ubuntu6
Candidate: 4:4.8.2-1ubuntu6
Version table:
*** 4:4.8.2-1ubuntu6 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
Though @coli u had told me to try out sudo apt-get install libxslt1-dev libxml2-dev command ,its working fine showing that
libxslt1-dev is already the newest version.
libxml2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 490 not upgraded.
And after it i try to install rails by gems install rails but the same error again comes up.
i had try to install nokogiri by trying out sudo gem install nokogiri -v '1.6.6.2' -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib
command & it was working fine. So help me guys..
Hello @colin when i tried to ru gem install nokogiri -v '1.6.6.2' -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib
command with out using Sudo i got this message-Error installing nokogiri:
ERROR: Failed to build gem native extension. Its kind of error that extconf.rb
so after that i tried gem install rails but the same error.
If Any mistake made by me then please help me to correct on this.
Please make sure you have also installed libxml2-dev, notice the suffix!
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuBLeUspyJnwTO1ZP3JcjQ4jPPW3c_3Ejzpb6LckLwi1g%40mail.gmail.com.
Sorry, that answer was to the wrong mail, because of some flaws of Google's inbox mailclient.
In fact he only checked for libxml2, not for libxml2-dev as far as I understand ops answer.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLu0Eo%2BfsvUarGeSztoh%3Di05xcbH5jMtnE77WioW-%2BvEBA%40mail.gmail.com.
> cd ~/declan/Downloads/ruby-2.2.3
#create dir below first manually as user "declan" otherwise they will automatically get created belonging to root
> ./configure --prefix=/home/declan/dev/web_framework/rails/ruby/2.2.3/
> make
> sudo make install
# cd /home/declan/tmp/
wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
tar -xzvf chruby-0.3.9.tar.gz
cd chruby-0.3.9/
> PREFIX=/home/declan/dev/web_framework/rails/chruby/0.3.9/ make install
RUBIES+=("/home/declan/dev/web_framework/rails/ruby/2.2.3/")
> source /home/declan/dev/web_framework/rails/chruby/0.3.9/share/chruby/chruby.sh
> chruby 2.2.3
> ruby --version # 2.2.3
> gem install nokogiri -- --use-system-libraries
> gem install rails
> rails --version
Rails 4.2.4