[Rails] PDF Thumbnail screen in a page

2012-01-21 Thread Joachim Cheng
Hi bro/sis, Do you know the plugin to show the big icons of PDF (has attached as above) in the webpage? How to write a code? I am using paperclip and rails 3.1.x. Thank you bro/sis!! Best regards, Joachim Attachments: http://www.ruby-forum.com/attachment/6927/PDF_thumbnail.jpg -- Posted via h

[Rails] Using Mongoid with ActiveRecord

2012-01-21 Thread Mike Kim
I'm trying to use mongodb and postgresql simultaneously with Rails 3.1. I believe I have everything set up correctly. What I'm interested in knowing is how to get rails to flip-flop back- and-forth between mongoid and activerecord. For example, if I want to generate an ActiveRecord model after us

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
Thank for all the people that help me, I see another tutorial, and I was having a huge mistake, I wasn't restart the terminal, that was the problem... Thank's again... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
> $ ruby list known # this will show all available rubies > # pick one of them, best is ruby 1.9.3 to start felipe@Felipe:~$ ruby list know ruby: No such file or directory -- list (LoadError) felipe@Felipe:~$ > That's gibberish ... sorry > > $ rvm install ruby-1.9.3 felipe@Felipe:~$ rvm install

Re: [Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Peter Vandenabeele
On Sun, Jan 22, 2012 at 1:27 AM, Peter Vandenabeele wrote: > > > On Sun, Jan 22, 2012 at 1:09 AM, Felipe Pieretti Umpierre < > li...@ruby-forum.com> wrote: > >> Ok, I try, but, look what happen when I put rvm get stable >> >> felipe@Felipe:~$ rvm get stable >> felipe@Felipe:~$ >> >> nothing... >>

Re: [Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Peter Vandenabeele
On Sun, Jan 22, 2012 at 1:09 AM, Felipe Pieretti Umpierre < li...@ruby-forum.com> wrote: > Ok, I try, but, look what happen when I put rvm get stable > > felipe@Felipe:~$ rvm get stable > felipe@Felipe:~$ > > nothing... > > I'm brazilian, so, the language is portuguese, but I guess is easy to > kn

[Rails] How do I add conditional style in rails 3.1

2012-01-21 Thread femto Zheng
Hello,I'm using blueprint and the css looks like this: for rails 3.1, it has asset pipleline ,compiles all the css into one large css file, so how do I handle conditional including stylesheet like

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
Ok, I try, but, look what happen when I put rvm get stable felipe@Felipe:~$ rvm get stable felipe@Felipe:~$ nothing... I'm brazilian, so, the language is portuguese, but I guess is easy to know the error messages. felipe@Felipe:~$ rvm get stable felipe@Felipe:~$ ruby -v ruby 1.9.2p290 (2011-07

[Rails] site5 uninitialized constant NameError

2012-01-21 Thread Sp4wnX
Hi everyone, I just trying to migrate/upload my application to site5 server and I had this error and have no idea where should be or why because in my computer doesn't give this error. Maybe because they use apache or something like that. These are the possible causes: There may be a syntax error

Re: [Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Peter Vandenabeele
On Sat, Jan 21, 2012 at 11:55 PM, Felipe Pieretti Umpierre < li...@ruby-forum.com> wrote: > felipe@Felipe:~/Downloads/rubygems-1.8.15$ ruby -v > ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] > felipe@Felipe:~/Downloads/rubygems-1.8.15$ which ruby > /usr/local/bin/ruby > felipe@Felipe:~/D

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
felipe@Felipe:~/Downloads/rubygems-1.8.15$ ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] felipe@Felipe:~/Downloads/rubygems-1.8.15$ which ruby /usr/local/bin/ruby felipe@Felipe:~/Downloads/rubygems-1.8.15$ gem -v 1.8.15 felipe@Felipe:~/Downloads/rubygems-1.8.15$ which gem /usr/loc

Re: [Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread jason white
On Sat, Jan 21, 2012 at 4:30 PM, Felipe Pieretti Umpierre < li...@ruby-forum.com> wrote: > Ok, but, when I try with 'gem install rails' > > felipe@Felipe:~$ gem install rails > ERROR: Loading command: install (LoadError) >no such file to load -- zlib > ERROR: While executing gem ... (NameErr

Re: [Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Peter Vandenabeele
On Sat, Jan 21, 2012 at 11:30 PM, Felipe Pieretti Umpierre < li...@ruby-forum.com> wrote: > Ok, but, when I try with 'gem install rails' > > felipe@Felipe:~$ gem install rails > ERROR: Loading command: install (LoadError) >no such file to load -- zlib > ERROR: While executing gem ... (NameEr

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
Ok, but, when I try with 'gem install rails' felipe@Felipe:~$ gem install rails ERROR: Loading command: install (LoadError) no such file to load -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand felipe@Felipe:~$ some lib are missing

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread CavalryJim
On Jan 21, 3:53 pm, Felipe Pieretti Umpierre wrote: > CavalryJim wrote in post #1041969: > > > Also - in general, it is not a good idea to install gems using sudo. > > CavalryJim, what is the best way to install ? > > -- > Posted viahttp://www.ruby-forum.com/. As Colin stated, a best practice f

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
I'm following the tutorial, but when I try put the commando 'rvm install 1.8.7' shows felipe@Felipe:~$ rvm install 1.8.7 bash: /usr/bin/rvm: File or folder not found felipe@Felipe:~$ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Googl

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
CavalryJim wrote in post #1041969: > Also - in general, it is not a good idea to install gems using sudo. CavalryJim, what is the best way to install ? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

Re: [Rails] Installing rails on Ubuntu

2012-01-21 Thread Peter Vandenabeele
On Sat, Jan 21, 2012 at 10:39 PM, Felipe Pieretti Umpierre < li...@ruby-forum.com> wrote: > Hello, I'm trying to install the rails on ubuntu 11.10, but when I put > the command > > felipe@Felipe:~/Downloads/rubygems-1.8.15$ sudo gem install rails > --no-r1 --no-rdoc > ERROR: Loading command: inst

[Rails] Re: Installing rails on Ubuntu

2012-01-21 Thread CavalryJim
On Jan 21, 3:39 pm, Felipe Pieretti Umpierre wrote: > Hello, I'm trying to install the rails on ubuntu 11.10, but when I put > the command > > felipe@Felipe:~/Downloads/rubygems-1.8.15$ sudo gem install rails > --no-r1 --no-rdoc > ERROR:  Loading command: install (LoadError) >     no such file t

Re: [Rails] Installing rails on Ubuntu

2012-01-21 Thread Colin Law
On 21 January 2012 21:39, Felipe Pieretti Umpierre wrote: > Hello, I'm trying to install the rails on ubuntu 11.10, but when I put > the command > > felipe@Felipe:~/Downloads/rubygems-1.8.15$ sudo gem install rails The best way to install rails is to use rvm. See http://beginrescueend.com/ Coli

[Rails] Installing rails on Ubuntu

2012-01-21 Thread Felipe Pieretti Umpierre
Hello, I'm trying to install the rails on ubuntu 11.10, but when I put the command felipe@Felipe:~/Downloads/rubygems-1.8.15$ sudo gem install rails --no-r1 --no-rdoc ERROR: Loading command: install (LoadError) no such file to load -- zlib ERROR: While executing gem ... (NameError) unini

Re: [Rails] why doesn't an instance of Object get Class's new instance method?

2012-01-21 Thread Peter Vandenabeele
On Sat, Jan 21, 2012 at 9:03 PM, John Merlino wrote: > "Object is the root of Ruby's class hierarchy. Its methods are > available to all classes unless explicitly overridden." > > Wouldn't Class class be at the root of the class hierarchy? > > > After all, look at this: > > 1.9.2p290 :006 > Objec

Re: [Rails] Re: why doesn't an instance of Object get Class's new instance method?

2012-01-21 Thread Michael Pavling
On 21 January 2012 21:06, John Merlino wrote: > Then why: > > n = m.new > > doesnt "new" create an object that gives n access to m's class > methods, as it did in the other case? > > On Jan 21, 3:03 pm, John Merlino wrote: >> This fails: >> 1.9.2p290 :007 > B.new >> NoMethodError: undefined metho

[Rails] Re: why doesn't an instance of Object get Class's new instance method?

2012-01-21 Thread John Merlino
Let me phrase question differently, after finding out that new is actually a class method of Class class, as is all methods of Class class. m = Class.new creates an m object that has access to Class's class methods. So "new" created an object that has access to class methods in this case. Then w

[Rails] why doesn't an instance of Object get Class's new instance method?

2012-01-21 Thread John Merlino
"Object is the root of Ruby's class hierarchy. Its methods are available to all classes unless explicitly overridden." Wouldn't Class class be at the root of the class hierarchy? After all, look at this: 1.9.2p290 :006 > Object.instance_of? Class => true Object is an instance of class, after

Re: [Rails] before validate

2012-01-21 Thread Peter Vandenabeele
On Sat, Jan 21, 2012 at 4:30 AM, tashfeen.ekram wrote: > i am using before validate to format my input from my view file for > the columns of type DateTime. I have pasted the code for the > validation and works well for creating a new record. However, when > trying to update the record where the c

[Rails] Re: Problem with installing rails 3.2

2012-01-21 Thread jude
Problem solved,i just upgraded the ruby gems gem update --system gem install rails On Jan 21, 8:07 pm, Everaldo Gomes wrote: > I found this: > > http://stackoverflow.com/questions/7379385/invalid-gemspec-in-and-ill... > > > > > > > > On Sat, Jan 21, 2012 at 12:57 PM, jude wrote: > > Hi, > > >

Re: [Rails] Problem with installing rails 3.2

2012-01-21 Thread Everaldo Gomes
I found this: http://stackoverflow.com/questions/7379385/invalid-gemspec-in-and-illformed-requirement-whenever-i-create-a-new-project On Sat, Jan 21, 2012 at 12:57 PM, jude wrote: > Hi, > > When i tried to install rails 3.2, i am facing problems like > > Invalid gemspec in [/home/nthillaiarasu

[Rails] Problem with installing rails 3.2

2012-01-21 Thread jude
Hi, When i tried to install rails 3.2, i am facing problems like Invalid gemspec in [/home/nthillaiarasu/.rvm/gems/ruby-1.9.2- p0@rails32/specifications/activemodel-3.2.0.gemspec]: Illformed requirement ["# 3.2.0"] Invalid gemspec in [/home/nthillaiarasu/.rvm/gems/ruby-1.9.2- p0@rails32/specifica