nokogiri issues with ruby - ruby-on-rails

I wanted to install Ruby on Rails to learn more about how to programming with Ruby on Rails as I know there is a demand for this web application framework.
So, I downloaded the latest ruby and the dev kit for 64 bit which is present on the website.
I also installed sqlite3.
Then I was trying to create new blog.
I did:
cd blog/bin
rails server
I got this error:
[Error Log][1]
[1]: https://drive.google.com/file/d/0B-bBG8G__J_CN3JPTERZRTF5RDQ/view?usp=sharing
I have also had similar issues with sqlite3 and played with the Gem file,
Did I miss something with the installation?
I am completely novice on this issue, at least until now :-)

Related

first time user to Ruby on Rails program

i'm new user here. and this is my first question regarding Ruby on Rails. so, i wanted to ask what is the correct program version of Ruby on Rails, i have seen only 2.1 and 2.2.
i was looking for 5.0 to install and use it for first time. i chose RoR (nickname for Ruby on Rails) to create a website that can have many useful features like a site would do. but i'm at loss because i have no idea where i could find a RoR 5.0 or should i just install a older package of RoR to update to 5.0?
also, i have additional questions.
1: is RoR a program that can help you make website or blog, forum? or it's just a one in all package?
2: can you actually put together a section inside a site for news information/updates?
3: where do you find or make a code for mailing list which users can have a mail updates sent to their email?
these are my questions, you see i'm quite fond of a site that is run on RoR. so i'd like to try my hand on creating a site of my own, particularly one with a forum. like any kind of development, it's fun to learn. will you answer my questions and help me learn the program of Ruby on Rails?
Ruby is a programming language which has it's own version number. Rails is a library written in Ruby which has it's own version number as well.
The version of Ruby is not the same as the version of Rails. Rails 5.x requires Ruby version 2.2.2 or higher.
You can view the versions of each by using
$ ruby --version
$ rails --version
You can use the latest stable version of Ruby. – get it from here: https://www.ruby-lang.org/en/downloads/ (The current latest stable is 2.3.1)
To get the latest version of Rails, use the gem install command. (The current latest stable version is 5.0.0.1)
$ gem install rails

RubyMine 8 development not working. Keeps saying No Rails Found in SDK

Title kind of explains it. In both the Development Configuration and Preferences -> Languages -> Ruby SDK and Gems settings I have the correct Ruby version/Gemset selected. But it still just saying:
Error running Development: the_factory: [No Rails found in SDK]
I've used RubyMine on tons of projects and this has never given me a problem. But this is a new project, using Rails 5 and Ruby v2.3.0, and I just can't figure out what's going on here.
This is in Ruby SDK and Gems settings in RubyMine 8:
And this is my Development config:
Update
When I run rails server in my project folder, it works as expected.
Ok, so I checked it out a little on RubyMine help page and I found this magical phrase:
RubyMine supports Ruby versions 1.8.6 to 2.2
So I removed my rvm Ruby 2.3 version, installed Ruby 2.2.4, create a gemset with Rails 5. Then I assigned that gemset to my project and Voilá! It worked as expected.
Note: This answer my specific question at the date I write this. But this obviously is not a long term answer, so if you are a future boy/girl with this very same problem, first check if your RubyMine version support Ruby >v2.3 before remove your current Ruby version.
For me the solution was that I had several Rails gem versions installed in my project directory.
gem uninstall rails
was the way to go, removing any unwanted versions. Feels like a contradiction - but uninstalling Rails meant that RubyMine could find Rails.

Ruby On Rails Install

I've spent some time in web development and since I have decided that ruby is quite a nice language to code in I want to try the reason why some people say ruby got known : Rails
I installed rails in my linux machine however I am now trying to develop it in Windows. I know that it was recommended to install rails using RVM in linux however I'm not sure what is the best way to install it in Windows since I've read articles which said that
gem install rails
is a method which will cause you lots of bugs in both linux and windows
My question to you is what is a method which is "bugless" to install rails in windows?
Is
gem install rails
actually buggy?
Yeah, installing Rails on Windows is a little more complicated, but that's why they have bundles for it.
Go here and follow instructions.
http://railsinstaller.org/en

Installing Ruby Version Manager AFTER ruby on rails installation

This might be a paranoid question, but am I likely to break anything in my ruby on rails app if I install RVM AFTER having installed rails?
Thanks in advance for any peace of mind you can offer me :P
Your App will be fine - but after installing RVM it will take some configuration get everything running back the way it was. This has nothing to do with your app, but with your environment. If you follow the installation instructions EXACTLY then it will not be too difficult.
If you are planning to do this on a production server then be prepared for some downtime.

Do I need to revert to an older version of Rails just to run a single legacy app (among other problems)?

I have an older Rails app that I need to run. But I have the latest version of Rails.
When I try to run this older app it says:
Missing the Rails 1.99.0 gem. Please
gem install -v=1.99.0 rails
But when I run the command: gem install -v=1.99.0 rails
ERROR: could not find gem rails
locally or in a repository
Not sure what to do next. Could someone help me understand what's happening here?
And my second question, related to this problem is: It seems silly that I need to revert to an older version of Rails just to run this one legacy app - there must be a better way of doing this?
AFAIK, v1.99.0 is sort of a v2.0 prerelease, so you could try installing v2.0.x, changing the RAILS_GEM_VERSION in config/environment.rb and runing rake rails:update.
If you think about it, it's not as silly as it might seem at first. You make an app using a fast evolving web framework as RoR. Your choices are: continue developing your app at aproximately the same pace the framework is evolving, or freeze the rails gem (and evertything else your app depends on, like gems, plugins) into your app in order to make it less fragile to expecting gem updates.
Regarding the second question: yes it is silly. Fortunately the Rails team spotted that silliness and at some point they gave us the ability to "freeze" the versions of Rails libraries required by an application (and also specific gem versions) into the vendor directory.
To freeze your version of Rails:
rake rails:freeze:gems
There's a good blog post from a while back describing this.
Unless you install and deploy RVM, your installation will roll back your system rails installation, which will impact your other projects. If you want to manually administrate your development environment this way, you can uninstall rails first, and then install the desired version of rails for the current project.
But try to install your rails gem instead with this syntax:
sudo gem install rails -v 1.99.0

Resources