# Ubuntu SourceView

**URL:** <https://www.ruby-forum.com/t/ubuntu-sourceview/197200>\
**Category:** Ruby-Gnome 2\
**Created:** [September 14, 2010, 6:59pm UTC](https://www.ruby-forum.com/t/ubuntu-sourceview/197200 "2010-09-14T18:59:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 14, 2010, 6:59pm UTC](https://www.ruby-forum.com/t/ubuntu-sourceview/197200/1 "2010-09-14T18:59:08Z")

</div>

hi,

i’m resending this mail, because it’s been considered Spam, and i’m  
still  
stuck on this.

i wanted to test my app on ubuntu lucid, but while require  
‘gtksourceview’  
on gentoo works fine i find out that on ubuntu they only have  
libgtksourceview2-ruby which has it version 0.19-3-1ubuntu3, which means  
the  
following files for them:  
…  
gtksourceview2.rb  
…  
so i have to change my require to ‘gtksourceview2’ ?  
i did that, but then i ran into 'uninitialized constant  
Gtk::SourceLanguagesManager

so i guess this is not the right way to install the Gtk::SourceView on  
ubuntu.

can anyone help me out with this?

ny source looks good on gentoo like this:

require ‘gtksourceview’  
class MySourceView \< Gtk::ScrolledWindow  
def initialize  
@lm=Gtk::SourceLanguagesManager.new  
@source\_buffer = Gtk::SourceBuffer.new  
@source\_buffer.set\_highlight(true)  
…

thanks

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 15, 2010, 12:05am UTC](https://www.ruby-forum.com/t/ubuntu-sourceview/197200/2 "2010-09-15T00:05:53Z")

</div>

I haven’t had time to look at this, but I have an app that  
uses gtksourceview. As you say, it currently doesn’t work  
on Ubuntu. I will look at it tonight to see if I can find  
the problem.

```
    MikeC
```

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 15, 2010, 8:15am UTC](https://www.ruby-forum.com/t/ubuntu-sourceview/197200/3 "2010-09-15T08:15:43Z")

</div>

Thanks for the answer,  
I already updated my source to fall back to Gtk::TextView if using  
Gtk::SourceView fails.  
But i’m still curious about the situation.

Thanks  
Balint

On 09/15/2010 01:05 AM, Mike C. wrote:

> > i’m resending this mail, because it’s been considered Spam, and i’m still  
> > i did that, but then i ran into 'uninitialized constant  
> > class MySourceView\< Gtk::ScrolledWindow  
> > Start uncovering the many advantages of virtual appliances  
> > Start uncovering the many advantages of virtual appliances  
> > and start using them to simplify application deployment and  
> > accelerate your shift to cloud computing.  
> > [Best Open Source Mac Front-Ends 2023](http://p.sf.net/sfu/novell-sfdev2dev)
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> removed\_email\_address@domain.invalid  
> [ruby-gnome2-devel-en List Signup and Options](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
Dobai-Pataky B.

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [October 9, 2010, 11:05pm UTC](https://www.ruby-forum.com/t/ubuntu-sourceview/197200/4 "2010-10-09T23:05:02Z")

</div>

It’s actually called Gtk::SourceLanguageManager now.

This script works for me on 10.04. It installs the required packages for  
gtksourceview2 and then downloads, compiles and installs the latest ruby  
bindings. It complains it can’t compile a bunch of bindings as I’ve not  
bothered to install all the libs but it works for sourceview2.

sudo apt-get install libglib2.0-dev libatk1.0-dev libpango1.0-dev  
libgtk2.0-dev libgtksourceview2.0-dev  
gem install pkg-config  
wget  
[http://sourceforge.net/projects/ruby-gnome2/files/ruby-gnome2/ruby-gnome2-0.90.2/ruby-gnome2-all-0.90.2.tar.gz](http://sourceforge.net/projects/ruby-gnome2/files/ruby-gnome2/ruby-gnome2-0.90.2/ruby-gnome2-all-0.90.2.tar.gz)

tar xf ruby-gnome2-all-0.90.2.tar.gz  
cd ruby-gnome2-all-0.90.2  
ruby extconf.rb  
sudo make  
sudo make install

HTH

Dobai-Pataky B. wrote:

> hi,
> 
> i’m resending this mail, because it’s been considered Spam, and i’m  
> still  
> stuck on this.
> 
> i wanted to test my app on ubuntu lucid, but while require  
> ‘gtksourceview’  
> on gentoo works fine i find out that on ubuntu they only have  
> libgtksourceview2-ruby which has it version 0.19-3-1ubuntu3, which means  
> the  
> following files for them:  
> …  
> gtksourceview2.rb  
> …  
> so i have to change my require to ‘gtksourceview2’ ?  
> i did that, but then i ran into 'uninitialized constant  
> Gtk::SourceLanguagesManager
> 
> so i guess this is not the right way to install the Gtk::SourceView on  
> ubuntu.
> 
> can anyone help me out with this?
> 
> ny source looks good on gentoo like this:
> 
> require ‘gtksourceview’  
> class MySourceView \< Gtk::ScrolledWindow  
> def initialize  
> @lm=Gtk::SourceLanguagesManager.new  
> @source\_buffer = Gtk::SourceBuffer.new  
> @source\_buffer.set\_highlight(true)  
> …
> 
> thanks

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [February 10, 2012, 4:41am UTC](https://www.ruby-forum.com/t/ubuntu-sourceview/197200/5 "2012-02-10T04:41:22Z")

</div>

thankyou philthompson!

You’ve solved my 2 day long install!

I want to post complete instructions so others can benefit too:

sudo apt-get install libglib2.0-dev libatk1.0-dev libpango1.0-dev  
libgtk2.0-dev libgtksourceview2.0-dev ruby1.8-dev

After that, you can now install the new gems for the bindings (Thanks  
you Ruby/Gnome2 team for the gems!!! Andrea 😉 )

sudo gem install gtk2  
sudo gem install gtksourceview2

Please correct me if this is wrong.
