TITLE: Does this give a localization of a ring?
QUESTION [8 upvotes]: Apologies in advance for the naivety of this question.
Let $R$ be a commutative (resp. non-commutative) ring, $S \subset R$, and let $R' = R[x_s (s \in S)]$ be the polynomial ring obtained by adding a formal variable $x_s$ for each $s \in S$.  Let $I$ be the ideal (resp. 2-sided ideal) generated by {$sx_s-1\ |\ s \in S$}.  
Does the quotient $R'/I$ yield the localization $S^{-1}R$ in general?  If not, what if we assume $R$ is commutative and/or $S$ is finite?

EDIT: Thanks to Mariano and Arturo for the quick responses!  Both of their responses say that my construction works in the non-commutative case when $R'$ is replaced with a "non-commutative polynomial ring."  But the Wikipedia article on the localization of a ring states that in the non-commutative case, the localization doesn't exist for all prospective sets of units $S$.  What gives?

REPLY [3 votes]: Here's an expansion of my answer from a related question. In my opinion, the most enlightening (and the simplest) way to present the universal construction of localizations (and fractions) is to use instead of the pair construction the natural presentation in terms of generators and relations. This allows one to exploit the universal properties of quotient rings and polynomial rings to quickly construct and derive the basic properties of localizations (and to avoid the many tedious verifications required in the pair approach). Moreover, this approach is much more conceptual. Indeed, the pairs in the pair construction are nothing but normal forms for the polynomial terms in the presentation based approach.  For details of this approach see e.g. the exposition in section 11.1 of Rotman's Advanced Modern Algebra, and Voloch's: Rings of fractions the hard way. Note: presumably Voloch's title is a joke - since the presentation based approach is actually the easiest way - in fact both Rotman's and Voloch's expositions can be simplified.
Presumably the reason that the pair construction is preferred over the generators and relations approach is that the latter does not work in the noncommutative case. For more on this see Cohn's survey mentioned below.
If you're just beginning to understand universal constructions then I highly recommend that you peruse the beautiful exposition in George Bergman's An Invitation to General Algebra and Universal Constructions.
You might also find illuminating Paul Cohn's historical article Localization in general rings, a historical survey - as well as other papers in that volume [1].
[1] Ranicki, A.(ed). Noncommutative localization in algebra and topology. ICMS 2002