Skip to main content

right short solution for the unbuntu error extension "ERROR: Error installing rails:ERROR: Failed to build gem native extension."

ERROR: Error installing rails:ERROR: Failed to build gem native extension.Ubuntu



Last all day, I try to fix the error "ERROR:  Error installing rails:ERROR: Failed to build gem native extension.". I want to build a "bundle install" on ubuntu 16. I search and do many solutions on the website found but have no good results. I think in the deep and get a conclusion about this problem. The start point is ruby, so I must install it at the begin. Then, I search some key and pick 1 random solution up. I have a right choice. It was fixed. I share with you my solution.

The first references, this link for detail: https://gorails.com/setup/ubuntu/16.04

The second, I detail my action to make it work.
1.Ready for setup, all command:"
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
"
2.Pick 1 way to setup ruby, I followed the first by using rbenv:
"
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

rbenv install 2.5.1
rbenv global 2.5.1
ruby -v
"

3.At last install bundle"
gem install bundler
"

So amazing, "bundle install" work without any error. It was fixed

Comments

Popular posts from this blog

YouTube Creator Academy-Grow your audience boot camp-Day 1

I registered the "Grow your audience boot camp" event from youtube creator academy. The lesson is good for me to improve my youtube channel named " Explorer Mr Channel ". I take note  my study day by day. Hope this drive me to the top of the world. Here is the day first day I join the course. The recorder is started. steps 1: I register the course event in my youtube channel. The mail send to me after that. steps 2: Following the guide of the mail I come to the course and start at the newbie level. steps 3: I view and read the guide line of the lesson. steps 4: I answer the question and do some quiz. Day 1: Get discovered( time 15 mins, basic level) Subject read: Best practices-make the most of your metadata-Improve video discovery-Help suggest videos and craft engaging subscriber notifications. Get activities. Check your knowledge: Question 1: Why is it important to add appropriate metadata and not attempt to “game” YouTube’s search and discovery systems...

YouTube Creator Academy-Grow your audience boot camp-Day 3

I posted the previous blog . Here is day 3: Make great thumbnails, 90% of the best-performing videos on YouTube have custom thumbnails. Attract more viewers and increase watch time by creating visually interesting, click-compelling thumbnails of your own. Day 3: Make great thumbnails, 90% of the best-performing videos on YouTube have custom thumbnails. Attract more viewers and increase watch time by creating visually interesting, click-compelling thumbnails of your own. ( time 15 mins, basic level) Subject read: Best practices: -Choose an image that describes your video. +Create thumbnails that accurately describe your video so viewers know what they’re about to watch. -Design an image that gets viewers to click. +For your audience, an eye-catching thumbnail can be the difference between choosing to watch a video or scrolling right past it -- so select images that will attract viewers. -Tell a cohesive story wity your thumbnail and title +When titles and thumbnails...

YouTube Creator Academy-Your channel trailer in the course: Foundations for success boot camp- day 4

YouTube Creator Academy-Your channel trailer in the course: Foundations for success boot camp- day 4 First impressions matter. You can win the hearts of unsubscribed viewers with a captivating trailer. BEST PRACTICES: How can you turn viewers into subscribers? The first thing your unsubscribed viewer will see when they come to your channel is your channel trailer and channel description, so use them to hook in your viewers and turn them into subscribers. Remember, subscribers tend to watch more (which boosts watch time) so you want to make an awesome first impression when viewers first discover your channel. -Produce a captivating trailer: Your channel trailer is like a movie trailer - use it as a way to offer a preview of your channel's offerings so viewers will want to subscribe. What should go into it? Think about the unique qualities of your channel, your personality, and why viewers should feel compelled to return. There are many ways to make a channel trailer, but...