Hassan Schroeder | 1 Nov 01:02 2011
Picon

Re: install

On Mon, Oct 31, 2011 at 2:33 PM, BigC <carl@...> wrote:
> I just got a mac book pro and was thinking I would try my hand a ruby
> and ruby on rails I have installed rails with sudo gem install rails
> four different times because no one says to be in a certain dir when
> you start the install.

That's because it doesn't matter.  :-)

What is the output of `sudo gem install rails` ?

What is the output of `gem list --local` ?

What is the output of `gem env` ?

-- 
Hassan Schroeder ------------------------ hassan.schroeder@...
http://about.me/hassanschroeder
twitter:  <at> hassan

--

-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Everaldo Gomes | 1 Nov 01:03 2011
Picon

Re: Re: Validation on Routes



On Mon, Oct 31, 2011 at 9:36 PM, Nikhil Goyal <goyal.nikhil89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Nov 1, 2:57 am, Everaldo Gomes <everaldo.go...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi!
>
> Try this:
>
> match ':/:token' => 'users#new' , constraints => {  :token =>
> /[a-zA-Z0-9]{8}/ }
>
> There is \w in regexp that means letter, number and underscore (accordlying
> rubular.com) , but I don't know if your token accepts underscores.
>


No there are no underscores. only alphabets and numbers.


So, try using /[a-zA-Z0-9]/ as your constraint. I can't remember a shortcut for alphanumeric, if there is one.


 
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
dado_eyad | 1 Nov 03:23 2011
Picon

Re: ConnectionNotEstablished with Mysql on ubuntu

here's the full trace


<code>
activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:409:in `retrieve_connection' activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:107:in `retrieve_connection' activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection' activerecord (3.1.1) lib/active_record/query_cache.rb:65:in `rescue in call' activerecord (3.1.1) lib/active_record/query_cache.rb:59:in `call' activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' activesupport (3.1.1) lib/active_support/callbacks.rb:392:in `_run_call_callbacks' activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:28:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/reloader.rb:68:in `call' rack (1.3.5) lib/rack/sendfile.rb:101:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call' railties (3.1.1) lib/rails/rack/logger.rb:13:in `call' rack (1.3.5) lib/rack/methodoverride.rb:24:in `call' rack (1.3.5) lib/rack/runtime.rb:17:in `call' activesupport (3.1.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.3.5) lib/rack/lock.rb:15:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/static.rb:53:in `call' railties (3.1.1) lib/rails/engine.rb:456:in `call' railties (3.1.1) lib/rails/rack/content_length.rb:16:in `call' railties (3.1.1) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.3.5) lib/rack/handler/webrick.rb:59:in `service' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
</code>

and here's the database.yml

<code>
development:
  adapter: mysql2
  host: 127.0.0.1
  encoding: utf8
  reconnect: false
  database: myapp_development
  pool: 5
  username: root
  password:*****
  socket: /var/run/mysqld/mysqld.sock
</code>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/XxCouhDMnzwJ.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Kevin Bedell | 1 Nov 03:27 2011
Picon

Re: install

https://github.com/thoughtbot/laptop

This pointer takes you to a project with a couple of scripts that
should setup what you need. It'sa polished and maintained set of
scripts for installing ruby on rails on a mac.

Best of luck!
-kevin

 <at> kbedell

On Mon, Oct 31, 2011 at 5:33 PM, BigC <carl@...> wrote:
> I just got a mac book pro and was thinking I would try my hand a ruby
> and ruby on rails I have installed rails with sudo gem install rails
> four different times because no one says to be in a certain dir when
> you start the install. I do which rails and get Rails is not currently
> installed on this system. To get the latest version, simply type: I
> have tried adding to the path where gem says rails is and I have
> restarted the whole computer still no luck any help would be great. I
> used the video on Lynda.com followed from the beginning so I am not
> sure whats going on.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@...
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

--

-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

prasetya utama | 1 Nov 04:53 2011

Dynamical refresh div with in rails

I have tried many solution for making dynamical refersh div with rails.
I want to make like time posting i facebook. For example

Hello

2 minutes ago

I want time posting ("time minutes ago") auto refersh and update real
time do you have solution ?

-- 
Posted via http://www.ruby-forum.com/.

--

-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

MaT 2. | 1 Nov 05:15 2011

Re: rubygems Problem on ubuntu 10.04

Alex Mercer wrote in post #1029306:
> Try to install dev lib for zlib:
>  $ sudo apt-get -y install zlib zlib-devel

thank for answer..

i already try this command but nothing is working..

below is addition information of my problem when i try to install rail 
using --debug command.i hope any expert can help me to solve this 
problem..
your help is very appreciated.thank you very much.

oneadmin <at> oneadmin:/var/lib/gems/1.8$ sudo gem install rails --debug
Exception `NameError' at 
/usr/lib/ruby/1.8/rubygems/command_manager.rb:161 - uninitialized 
constant Gem::Commands::InstallCommand
Exception `Gem::LoadError' at /usr/lib/ruby/1.8/rubygems.rb:827 - Could 
not find RubyGem test-unit (>= 0)

Exception `Gem::LoadError' at /usr/lib/ruby/1.8/rubygems.rb:827 - Could 
not find RubyGem sources (> 0.0.1)

Exception `EOFError' at /usr/lib/ruby/1.8/net/protocol.rb:135 - end of 
file reached
Exception `Zlib::DataError' at /usr/lib/ruby/1.8/rubygems.rb:599 - 
incorrect header check
ERROR:  While executing gem ... (Zlib::DataError)
    incorrect header check
        /usr/lib/ruby/1.8/rubygems.rb:599:in `inflate'
        /usr/lib/ruby/1.8/rubygems.rb:599:in `inflate'
        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:100:in `fetch_spec'
        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:72:in `fetch'
        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:71:in `map'
        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:71:in `fetch'
        /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:99:in 
`find_gems_with_sources'
        /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:192:in 
`find_spec_by_name_and_version'
        /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:213:in 
`install'
        /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:118:in 
`execute'
        /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:in 
`each'
        /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:in 
`execute'
        /usr/lib/ruby/1.8/rubygems/command.rb:257:in `invoke'
        /usr/lib/ruby/1.8/rubygems/command_manager.rb:132:in 
`process_args'
        /usr/lib/ruby/1.8/rubygems/command_manager.rb:102:in `run'
        /usr/lib/ruby/1.8/rubygems/gem_runner.rb:58:in `run'
        /usr/bin/gem:21

-- 
Posted via http://www.ruby-forum.com/.

--

-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Colin Law | 1 Nov 08:43 2011

Re: ConnectionNotEstablished with Mysql on ubuntu

On 1 November 2011 02:23, dado_eyad <d.eyad.t@...> wrote:
> ...
> and here's the database.yml
> <code>
> development:
>   adapter: mysql2
>   host: 127.0.0.1
>   encoding: utf8
>   reconnect: false
>   database: myapp_development
>   pool: 5
>   username: root
>   password:*****
>   socket: /var/run/mysqld/mysqld.sock
> </code>

Was it ok when you created the database (rake db:create) or if you did
not create it like that are you able to run migrations ok?  (And are
you still able to run migrations ok).

Colin

--

-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Jim Ruther Nill | 1 Nov 08:44 2011
Picon

Re: Overriding number_to_human (Rails 3.0.5)



On Wed, Oct 26, 2011 at 10:23 PM, cipher_neo <l33z3r <at> gmail.com> wrote:
I encountered a problem today, in that the number_to_human helper has a defect where it spits out an error when passed any number bigger than 0 and less than 1. 

eg number_to_human(0.2) gives "nil can't be coerced into fixnum"

So, I found this patch:


Now to apply it, I had to create a file: lib/number_helper_overrides and put the override code in there:

module ActionView
  module Helpers 
    module NumberHelper
      def number_to_human(number, options = {})
        #the code in here bla bla
      end
    end
  end
end
 
then in environment.rb I put:

require "number_helper_overrides"

Is this the proper way to override in rails 3?

If so, then should I really need to put the "require" statement into the environment.rb file? 
I already have the autoload path set to load file from the lib directory?


Have you tried putting it in config/initializers/?  You won't need the require statement if you put it there.

 
thanks, 

Lee

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/HKovAngcdhQJ.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



--
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
cipher_neo | 1 Nov 10:34 2011
Picon

Re: Overriding number_to_human (Rails 3.0.5)

yes, that seems to have done the job, thanks!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/OU2B4X8HpiQJ.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ranadheer S. | 1 Nov 10:46 2011

echo command in rails

Hi,

    I am following the instructions given in the link
"http://mutoumahendra.blogspot.com/2010/07/tinymceplugins-spellchecker-on-rails.html"
for doing spell check.

    The problem I am facing here is, I am not able to run
`echo "#{spell_check_text}" | aspell -a -l #{lang}` command while
executing command. When I execute the method the above command is
returning blank.

My question is How to run echo "statement" in rails.

In command prompt I am able to run the echo using exec 'echo blah blah'.

Cheers,
Rana.

-- 
Posted via http://www.ruby-forum.com/.

--

-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


Gmane