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
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.
/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.
You have forgotten to tell us which operating system you are using.
I see you are using rvm, usually that will install the dependencies for
you. Did you install rvm using the recommended method
curl -L https://get.rvm.io | bash -s stable --rails
Everything seems ok in RVM it shows me- Checking requirements for ubuntu.
Requirements installation successful.
But issue in Rails installation pls see the above picture and help me…
well when i was trying to run sudo apt-get install mkmf
it showing me Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package mkmf
cause i know there are issue in mkmf files. so when i tried to run build essential -. by putting this- sudo apt-get install build-essential
the error arise like -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.
It would help me if you could insert your reply at appropriate points
in the previous message as I am doing, it makes it easier to follow
the thread. Thanks.
Can you copy/paste the full command you are entering with the full
results please.
mkmf is not a package to install. The error was telling you that more
information may be found in the log file mkmf.log. In practice it is
unlikely that this will help.
So i think if mkmf file issue will sort out then everything will goes well…so can you help me to how could mkmf file issue resolve?
please send me some of the commands that can be helpful.
i have tried out sudo apt-get install libmagickwand-dev
gem update --system
sudo apt-get install ruby-dev
sudo apt-get install mkmf
and many more command have tried but the same issue.
As I suggested previously please reply with your message after the
relevant bits of the one you are replying to. Thanks.
As I said previously mkmf.log is a log file produced by the make, but
it is unlikely to help. Did you see my previous message where I asked
you to copy/paste the full command and result of the command you are
using to install rails?
ok please have a look -
prasanna@prasanna-HP-Pavilion-dv6-Notebook-PC:~/rubyinstaller$ sudo apt-get install ruby-dev zlib1g-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
ruby-dev is already the newest version.
zlib1g-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 486 not upgraded.
Please post your reply inline in the previous message as I have asked
multiple times. If you want me to help then do this.
Please also read more carefully what I am asking for. I asked for the
command and output for the command that you are using to try to
install rails, not the result of all the commands that work ok.
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.
He said he had already done
sudo apt-get install build-essential
and that
rvm requirements
said that all is installed, so if gcc is not installed then it is a little
strange.
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?
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?
I had missed that, I do not display images by default and had not even
noticed that there was an image as no reference was made to it in the
text.
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 Index of /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.
if i use sudo gem install rails, its showing 31 gems already installed,but when i type rails -v it showing me
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in to_specs': Could not find railties (>= 0) amongst [activesupport-4.2.4, bundler-1.10.6, bundler-unload-1.0.2, executable-hooks-1.3.2, gem-wrappers-1.2.7, i18n-0.7.0, mini_portile-0.6.2, minitest-5.8.0, rails-deprecated_sanitizer-1.0.3, rubygems-bundler-1.4.4, rvm-1.11.3.9, thread_safe-0.3.5, tzinfo-1.2.2] (Gem::LoadError) from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in to_spec’
from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in gem' from /usr/local/bin/rails:22:in ’
I am starting to run out of ideas, but before we use the sledgehammer
approach, what is shown by the commands
gem -v
and
which gem
Please when posting back results copy/paste the full results with the
command you entered) rather than re-typing bits of it. Sometimes bits that
you consider not relevant may be important.
Also if you could post your reply back inline in the previous message so
that your answer follows the question that would make it easier to follow
the thread. Thanks. If you are using the gmail web browser interface then
clicking the three dots at the bottom left of the text window when replying
will show the previous message so you can insert your reply at the
appropriate place.