Ruby on Rails Friday, September 30, 2011

My application is starting/loading very late when hit my website url
in the browser.
Can anybody give some tips to optimize it please.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Robby Russell wrote in post #72333:
> SELECT MAX(id) FROM entities;
> Then run...
> This should be higher than the last result.
> If it's not higher... run this to try and fix it. (run a quick
> pg_dump first...)
> SELECT setval('entities_id_seq', (SELECT MAX(id) FROM entities)+1);
> reload your app...and see if its still happening.

I have the same problem but I don't know how to solve it since I can't
relate the solution here (names of tables, etc.) to the data given by
the OP. How do you know you need to SELECT MAX(id) FROM entities, or
SELECT setval('entities_id_seq', (SELECT MAX(id) FROM entities)+1);
with the information given by the OP? I can't see the relation and
therefore I have no clue how I can solve my problem.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

>
> :s3_permissions => :public
>
> in your has_attached_file call.
>
> But if you pass :private instead, then the file can only be accessed
> through your S3 credentials. Okay, now only your app can read it. But
> that's what the expiring_url method is for. That gins up a one-time
> token that expires in N minutes, and allows one download during that
> window, after which it simply won't work at all. Your keys are used to
> create this token, but it's a one-way hash so you don't have any leakage
> possible of your actual credentials.
>
> Walter

I think the only problem I have left is that I was hoping to not use S3
and be able to store the files on my own server.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Sep 30, 2011, at 4:26 PM, Garrett S. wrote:

> I think I like what you're saying, but the only problem I have with it
> is controlling access to the paperclip url. This may mean I just don't
> understand how the paperclip urls work. But I'm also trying to ensure
> that only the user who uploaded it, can access it. I wasn't sure if I
> would be able to control this once a url for an audio file was exposed.

That's the beauty of how this works. When you save the file to S3, you have two basic options. Usually, you want these to be world-readable, so you pass

:s3_permissions => :public

in your has_attached_file call.

But if you pass :private instead, then the file can only be accessed through your S3 credentials. Okay, now only your app can read it. But that's what the expiring_url method is for. That gins up a one-time token that expires in N minutes, and allows one download during that window, after which it simply won't work at all. Your keys are used to create this token, but it's a one-way hash so you don't have any leakage possible of your actual credentials.

Walter

>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi,

I'm internationalizing a rails app, and I find myself rewriting the
models and attributes, is there any way, maybe rake maybe gem, that can
generate de yml file so that I just need to edited and define the right
translation?

I guess with model is easy, but it will be amazing if there is also
an option to catch all the strings.

Thanks a lot,

--
Miquel Cubel

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I think I like what you're saying, but the only problem I have with it
is controlling access to the paperclip url. This may mean I just don't
understand how the paperclip urls work. But I'm also trying to ensure
that only the user who uploaded it, can access it. I wasn't sure if I
would be able to control this once a url for an audio file was exposed.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Sep 30, 2011, at 4:06 PM, Garrett S. wrote:

> I'm writing a Ruby on Rails application which allows a user to upload an
> mp3 file, then play it back. I have it working to the point where a user
> can do those things, BUT there is an issue when seeking through the
> song. If a user seeks ahead (or lets it play) to a spot in the song,
> usually about 2/3 or 3/4 the way through the song, then attempts to seek
> back to the beginning (for example 0:20), the play timer will go to
> 0:20, like it should but the actual audio will start over again as if
> the user seeked to 0:00.
>
> Right now I'm simply attempting to get the song to play in chrome's
> basic html5 mp3 player that it uses when passed an mp3 file. This is the
> code I'm using to serve up the file, hopefully with all the correct
> headers:
>
> http://privatepaste.com/8406f69836
>
> I think it has something to do with send_file not accepting the range
> header, maybe it's just the way I'm setting it? I'd appreciate any
> insight into this problem. I feel like I'm so close because it pretty
> much all works, except for seeking near the beginning causing a new
> request.

Can you just pass the URL to the file, and not pass it through send_file? I've used

def download
if cannot?( :download, Title )
raise CanCan::AccessDenied
else
redirect_to @asset.source.expiring_url(10)
end
end

from Paperclip to handle a link to a protected file on S3. Works like a charm, and it's just a file download from S3, so it's up to the browser to handle that.

Walter

>
> Thanks!
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I'm writing a Ruby on Rails application which allows a user to upload an
mp3 file, then play it back. I have it working to the point where a user
can do those things, BUT there is an issue when seeking through the
song. If a user seeks ahead (or lets it play) to a spot in the song,
usually about 2/3 or 3/4 the way through the song, then attempts to seek
back to the beginning (for example 0:20), the play timer will go to
0:20, like it should but the actual audio will start over again as if
the user seeked to 0:00.

Right now I'm simply attempting to get the song to play in chrome's
basic html5 mp3 player that it uses when passed an mp3 file. This is the
code I'm using to serve up the file, hopefully with all the correct
headers:

http://privatepaste.com/8406f69836

I think it has something to do with send_file not accepting the range
header, maybe it's just the way I'm setting it? I'd appreciate any
insight into this problem. I feel like I'm so close because it pretty
much all works, except for seeking near the beginning causing a new
request.

Thanks!

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi,

I have a problem with the asset pipeline.
I have a css file in lib/assets/stylesheets/ but it is not included in
the asset pipeline...

I have the same thing with a js file in lib/assets/javascripts and it
works fine...

What I am missing?

Gregory

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Walter Davis wrote in post #1024385:
> On Sep 30, 2011, at 12:35 PM, Andre Flory wrote:
>
>> "RAILS_ENV" is not a command blah blah.
>>
>> So I reorder it to: rake db:migrate RAILS_ENV=production
>
> If you're using Rails 2.x, then this should work, although you might
> want to try quoting the word production in this syntax. If you're using
> Rails 3.x, then RAILS_ENV is deprecated or removed, depending on 3.0 vs
> 3.1. The new syntax is Rails.env, I believe.
>
> Walter


It's Rails 2.3.11 as per the requirements for the version of Redmine I
am installing. Rack version 1.1.1.

Neither single or double quotes worked in either ordering of the
command.

DemiSheep

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

What data type is the position column in your database?

--
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/-/aj7wLKhPGKgJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl

On Sep 30, 2011, at 20:42 , ben_hawk wrote:

>
> Anyone??
>
>
>
> ben_hawk wrote:
>>
>> I installed ruby 1.9.2 using RVM and then used Netbeans to install the
>> latest rails and gems etc.
>>
>> However when I create a new rails application and click finish i get the
>> following error
>>
>>
>> http://old.nabble.com/file/p32569627/Screen%2BShot%2B2011-09-30%2Bat%2B16.14.01.png
>> Screen+Shot+2011-09-30+at+16.14.01.png
>>
>> When I create a new rails project I correctly select the right version of
>> Ruby to use (1.9.2) and everything else including the gems are all set to
>> version ruby 1.9.2
>>
>> Does anyone know whats wrong?
>>
>> Thanks
>>
>> Ben Gibson
>>
>
> --
> View this message in context: http://old.nabble.com/Rails-on-Netbeans-6.9.1-tp32569627p32570934.html
> Sent from the RubyOnRails Users mailing list archive at Nabble.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@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
===============================================================================
Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz
===============================================================================

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Anyone??

ben_hawk wrote:
>
> I installed ruby 1.9.2 using RVM and then used Netbeans to install the
> latest rails and gems etc.
>
> However when I create a new rails application and click finish i get the
> following error
>
>
> http://old.nabble.com/file/p32569627/Screen%2BShot%2B2011-09-30%2Bat%2B16.14.01.png
> Screen+Shot+2011-09-30+at+16.14.01.png
>
> When I create a new rails project I correctly select the right version of
> Ruby to use (1.9.2) and everything else including the gems are all set to
> version ruby 1.9.2
>
> Does anyone know whats wrong?
>
> Thanks
>
> Ben Gibson
>

--
View this message in context: http://old.nabble.com/Rails-on-Netbeans-6.9.1-tp32569627p32570934.html
Sent from the RubyOnRails Users mailing list archive at Nabble.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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Technically I think it should still work but it's even easier in 3


match 'about', :to => 'info#about', :as => :about
match 'contact', :to => 'info#contact', :as => :contact
match 'privacy', :to => 'info#privacy', :as => :privacy

--
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/-/0pqGhve7ZHoJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Should be, I just did something following that recipe for my wife's site. It's a combo static/dynamic Rails 3.0.10 site.

Walter

On Sep 30, 2011, at 1:51 PM, xscribe@gmail.com wrote:

> Nice tip - thanks. I notice that Ryan uses this in his routes file:
>
> map.with_options :controller => 'info' do |info|
> info.about 'about', :action => 'about'
> info.contact 'contact', :action => 'contact'
> info.privacy 'privacy', :action => 'privacy'
> end
>
> Is that still valid in a 3.0/3.1 Rails environment?
>
> -p
>
>
> On Sep 30, 10:28 am, Walter Lee Davis <wa...@wdstudio.com> wrote:
>> On Sep 30, 2011, at 1:22 PM, xscr...@gmail.com wrote:
>>
>>> I'm just getting started with Rails, and as a simple task I wanted to
>>> rehost my website from bare html/apache to Rails.
>>
>>> What's a typical name for the controller for the main page of the
>>> website? Rails wants to pluralize it be default... Normally I'd name
>>> it after
>>> the table in the database it relates to, but for our web site, with no
>>> database behind it, that just doesn't seem correct.
>>
>>> Thanks,
>>
>> Ryan Bates has a Railscast about this, showing you how to go from static file service to files plus database for these sorts of "static" pages.
>>
>> http://railscasts.com/episodes/117-semi-static-pages
>>
>> What I have done in the past is to create a PagesController (empty), and then place my static pages in the views/pages folder. They Just Work™ from there. If you fiddle the routing, you can remove the /pages/ segment from the URL, too.
>>
>> Walter
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

The only location in my system that has a rails file is the following :

/usr/share/devicemgr/backend/vendor/rails/railties/bin/

Here is my $path variable :

/Users/skiabox/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin:/Users/skiabox/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/skiabox/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/skiabox/.rvm/bin:/Users/skiabox/pear/bin:/Applications/TextEdit.app/Contents/MacOS:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/ant/bin:/Users/skiabox/ZendFramework/bin

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Nice tip - thanks. I notice that Ryan uses this in his routes file:

map.with_options :controller => 'info' do |info|
info.about 'about', :action => 'about'
info.contact 'contact', :action => 'contact'
info.privacy 'privacy', :action => 'privacy'
end

Is that still valid in a 3.0/3.1 Rails environment?

-p


On Sep 30, 10:28 am, Walter Lee Davis <wa...@wdstudio.com> wrote:
> On Sep 30, 2011, at 1:22 PM, xscr...@gmail.com wrote:
>
> > I'm just getting started with Rails, and as a simple task I wanted to
> > rehost my website from bare html/apache to Rails.
>
> > What's a typical name for the controller for the main page of the
> > website? Rails wants to pluralize it be default...  Normally I'd name
> > it after
> > the table in the database it relates to, but for our web site, with no
> > database behind it, that just doesn't seem correct.
>
> > Thanks,
>
> Ryan Bates has a Railscast about this, showing you how to go from static file service to files plus database for these sorts of "static" pages.
>
> http://railscasts.com/episodes/117-semi-static-pages
>
> What I have done in the past is to create a PagesController (empty), and then place my static pages in the views/pages folder. They Just Work™ from there. If you fiddle the routing, you can remove the /pages/ segment from the URL, too.
>
> Walter

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Most likely the location of the rails executable is not in your path.


What does your path variable look like?

echo $PATH

--
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/-/H4CDu3IJubgJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I tried sudo gem install rails

and I get the following :

[code]
Successfully installed rails-3.1.0
1 gem installed
Installing ri documentation for rails-3.1.0...
file 'lib' not found
Installing RDoc documentation for rails-3.1.0...
file 'lib' not found
Stavros-Kefaleass-MacBook-Pro:~ skiabox$ rails -v
-bash: rails: command not found

[/code]


Any ideas?

Thank you.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Sep 30, 2011, at 1:22 PM, xscribe@gmail.com wrote:

> I'm just getting started with Rails, and as a simple task I wanted to
> rehost my website from bare html/apache to Rails.
>
> What's a typical name for the controller for the main page of the
> website? Rails wants to pluralize it be default... Normally I'd name
> it after
> the table in the database it relates to, but for our web site, with no
> database behind it, that just doesn't seem correct.
>
> Thanks,

Ryan Bates has a Railscast about this, showing you how to go from static file service to files plus database for these sorts of "static" pages.

http://railscasts.com/episodes/117-semi-static-pages

What I have done in the past is to create a PagesController (empty), and then place my static pages in the views/pages folder. They Just Work™ from there. If you fiddle the routing, you can remove the /pages/ segment from the URL, too.

Walter


--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I'm just getting started with Rails, and as a simple task I wanted to
rehost my website from bare html/apache to Rails.

What's a typical name for the controller for the main page of the
website? Rails wants to pluralize it be default... Normally I'd name
it after
the table in the database it relates to, but for our web site, with no
database behind it, that just doesn't seem correct.

Thanks,


Per

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Sep 30, 2011, at 12:35 PM, Andre Flory wrote:

> I have somewhat of a complex issue involving several different programs
> including redmine, MySQL, Ruby, Ruby on Rails etc.
>
> I am following the redmine instructions here:
> http://www.redmine.org/projects/redmine/wiki/RedmineInstall
>
> I am on step 5. where I am suppose to type "RAILS_ENV=production rake
> db:migrate"
>
> When I type this in the command prompt and hit enter I get an error:
> "RAILS_ENV" is not a command blah blah.
>
> So I reorder it to: rake db:migrate RAILS_ENV=production

If you're using Rails 2.x, then this should work, although you might want to try quoting the word production in this syntax. If you're using Rails 3.x, then RAILS_ENV is deprecated or removed, depending on 3.0 vs 3.1. The new syntax is Rails.env, I believe.

Walter

>
> This seems to work correct, but I get the following:
>
> ===============================================================
> C:\redmine-1.2.1>rake db:migrate RAILS_ENV=production --trace
> NOTE: SourceIndex.new(hash) is deprecated; From
> C:/redmine-1.2.1/config/../vendo
> r/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
> rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
> WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use
> 'task :t, [
> args] => [deps]' instead.
> at C:/redmine-1.2.1/lib/tasks/email.rake:170
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> rake aborted!
> Access denied for user 'redmine'@'localhost' (using password: YES)
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /mysql_adapter.rb:620:in `real_connect'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /mysql_adapter.rb:620:in `connect'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /mysql_adapter.rb:203:in `initialize'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /mysql_adapter.rb:75:in `new'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /mysql_adapter.rb:75:in `mysql_connection'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:223:in `send'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:223:in `new_connection'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:245:in `checkout_new_connection'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:188:in `checkout'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:184:in `loop'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:184:in `checkout'
> C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:183:in `checkout'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:98:in `connection'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_pool.rb:326:in `retrieve_connection'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_specification.rb:123:in `retrieve_connection'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
> /abstract/connection_specification.rb:115:in `connection'
> C:/redmine-1.2.1/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217
> :in `quoted_left_column_name'
> C:/redmine-1.2.1/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:
> in `acts_as_nested_set'
> C:/redmine-1.2.1/app/models/issue.rb:37
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `gem_original
> _require'
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 84:in `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
> 91:in `require_or_load_without_engine_additions'
> C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
> s.rb:132:in `require_or_load'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 51:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 18:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 63:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 22:in `const_missing'
> C:/redmine-1.2.1/app/models/project.rb:40
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `gem_original
> _require'
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 84:in `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
> 91:in `require_or_load_without_engine_additions'
> C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
> s.rb:132:in `require_or_load'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 51:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 18:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 63:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 22:in `const_missing'
> C:/redmine-1.2.1/app/models/attachment.rb:36
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `gem_original
> _require'
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 84:in `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
> 91:in `require_or_load_without_engine_additions'
> C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
> s.rb:132:in `require_or_load'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 51:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 18:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 63:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 63:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 63:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 63:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:
> in `acts_as_attachable'
> C:/redmine-1.2.1/app/models/message.rb:22
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `gem_original
> _require'
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
> `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 84:in `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
> 91:in `require_or_load_without_engine_additions'
> C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
> s.rb:132:in `require_or_load'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
> 51:in `load_missing_constant'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 06:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 18:in `const_missing'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:364:
> in `constantize'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:363:
> in `each'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:363:
> in `constantize'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/core_ext/string/i
> nflections.rb:162:in `constantize'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:157:in
> `observed_class'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:183:in
> `observed_classes'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:166:in
> `initialize'
> C:/Ruby187/lib/ruby/1.8/singleton.rb:94:in `new'
> C:/Ruby187/lib/ruby/1.8/singleton.rb:94:in `instance'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:38:in
> `
> instantiate_observers'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:36:in
> `
> each'
> C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:36:in
> `
> instantiate_observers'
> C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:15:
> in `define_dispatcher_callbacks'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:
> in `call'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:
> in `evaluate_method'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:
> in `call'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
> n `run'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
> n `each'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
> n `send'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
> n `run'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:
> in `run_callbacks'
> C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:
> in `send'
> C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:
> in `run_prepare_callbacks'
> C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:631:in
> `prep
> are_dispatcher'
> C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:185:in
> `proc
> ess'
> C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in
> `send
> '
> C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in
> `run'
>
> C:/redmine-1.2.1/config/environment.rb:20
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original
> _require'
> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 82:in `require'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:5
> 47:in `new_constants_in'
> C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
> 82:in `require'
> C:/redmine-1.2.1/vendor/rails/railties/lib/tasks/misc.rake:4
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in
> `call'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in
> `execute'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in
> `each'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in
> `execute'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in
> `invoke_wit
> h_call_chain'
> C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in
> `invoke_wit
> h_call_chain'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in
> `invoke_pre
> requisites'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in
> `each'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in
> `invoke_pre
> requisites'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in
> `invoke_wit
> h_call_chain'
> C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in
> `invoke_wit
> h_call_chain'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in
> `invoke'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in
> `inv
> oke_task'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in
> `top_
> level'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in
> `each
> '
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in
> `top_
> level'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in
> `sta
> ndard_exception_handling'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in
> `top_
> level'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in
> `run'
>
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in
> `sta
> ndard_exception_handling'
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in
> `run'
>
> C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
> C:/Ruby187/bin/rake:19:in `load'
> C:/Ruby187/bin/rake:19
> Tasks: TOP => db:migrate => environment
>
> C:\redmine-1.2.1>
> ===============================================================
>
> Here is my database.yml file contents:
>
> ###############################################################
>
> # MySQL (default setup).
>
> production:
> adapter: mysql
> database: redmine
> host: localhost
> username: redmine
> password: **********
> encoding: utf8
>
> development:
> adapter: mysql
> database: redmine_development
> host: localhost
> username: root
> password:
> encoding: utf8
>
> # Warning: The database defined as "test" will be erased and
> # re-generated from your development database when you run "rake".
> # Do not set this db to the same as development or production.
> test:
> adapter: mysql
> database: redmine_test
> host: localhost
> username: root
> password:
> encoding: utf8
>
> test_pgsql:
> adapter: postgresql
> database: redmine_test
> host: localhost
> username: postgres
> password: "postgres"
>
> test_sqlite3:
> adapter: sqlite3
> database: db/test.sqlite3
>
> ###############################################################
>
> I really need some direction here. It's almost like there is a problem
> with my users/passwords. I have changed the passwords not to contain "!"
> or any other special characters. I do have capital and lower case
> letters.
>
> Any help would be greatly appreciated.
>
> DemiSheep
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Use the 'pg' gem:

  gem 'pg'

And in config/database.yml:

  development:
    adapter: postgresql
    database: my_checkins_development
    host: localhost

Taken from a tutorial on my website: http://lassebunk.dk/2011/09/10/creating-a-location-aware-website-using-ruby-on-rails-and-postgis/

/Lasse

Once I changed the adapter to the correct string (postgresql) it worked great.
But I ran into a slightly different question.

I'm struggling with UTF-8 encoding and was wondering if:
1) there is any real difference in postgresql between setting up en_US.UTF-8 and POSIX as far as being able to read/write anything?  I'm thinking the answer is no.
2) when rails creates this database, is there some way I can add options to this yaml file to specify the encoding when it's created?

  encoding: unicode

-philip

Ruby on Rails

i had deployed an app to heroku, called falling-sky-4350.
i deleted the app from heroku.com, then created a new app clientside

heroku create
Creating sharp-window-8814... done, stack is bamboo-mri-1.9.2
http://sharp-window-8814.heroku.com/ |
git@heroku.com:sharp-window-8814.git

when trying to push it again, it seems to be looking for the old app

git push heroku master

! No such app as falling-sky-4350

fatal: The remote end hung up unexpectedly


how can i resolve this?

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I have somewhat of a complex issue involving several different programs
including redmine, MySQL, Ruby, Ruby on Rails etc.

I am following the redmine instructions here:
http://www.redmine.org/projects/redmine/wiki/RedmineInstall

I am on step 5. where I am suppose to type "RAILS_ENV=production rake
db:migrate"

When I type this in the command prompt and hit enter I get an error:
"RAILS_ENV" is not a command blah blah.

So I reorder it to: rake db:migrate RAILS_ENV=production

This seems to work correct, but I get the following:

===============================================================
C:\redmine-1.2.1>rake db:migrate RAILS_ENV=production --trace
NOTE: SourceIndex.new(hash) is deprecated; From
C:/redmine-1.2.1/config/../vendo
r/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use
'task :t, [
args] => [deps]' instead.
at C:/redmine-1.2.1/lib/tasks/email.rake:170
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Access denied for user 'redmine'@'localhost' (using password: YES)
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:620:in `real_connect'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:620:in `connect'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:203:in `initialize'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:75:in `new'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:75:in `mysql_connection'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:223:in `send'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:223:in `new_connection'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:245:in `checkout_new_connection'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:188:in `checkout'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:184:in `loop'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:184:in `checkout'
C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:183:in `checkout'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:98:in `connection'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_pool.rb:326:in `retrieve_connection'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_specification.rb:123:in `retrieve_connection'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/connection_specification.rb:115:in `connection'
C:/redmine-1.2.1/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217
:in `quoted_left_column_name'
C:/redmine-1.2.1/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:
in `acts_as_nested_set'
C:/redmine-1.2.1/app/models/issue.rb:37
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`gem_original
_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
84:in `require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
91:in `require_or_load_without_engine_additions'
C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
s.rb:132:in `require_or_load'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
51:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
18:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
63:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
22:in `const_missing'
C:/redmine-1.2.1/app/models/project.rb:40
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`gem_original
_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
84:in `require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
91:in `require_or_load_without_engine_additions'
C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
s.rb:132:in `require_or_load'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
51:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
18:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
63:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
22:in `const_missing'
C:/redmine-1.2.1/app/models/attachment.rb:36
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`gem_original
_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
84:in `require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
91:in `require_or_load_without_engine_additions'
C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
s.rb:132:in `require_or_load'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
51:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
18:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
63:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
63:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
63:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
63:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:
in `acts_as_attachable'
C:/redmine-1.2.1/app/models/message.rb:22
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`gem_original
_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in
`require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
84:in `require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
91:in `require_or_load_without_engine_additions'
C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
s.rb:132:in `require_or_load'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
51:in `load_missing_constant'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
06:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
18:in `const_missing'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:364:
in `constantize'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:363:
in `each'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:363:
in `constantize'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/core_ext/string/i
nflections.rb:162:in `constantize'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:157:in
`observed_class'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:183:in
`observed_classes'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:166:in
`initialize'
C:/Ruby187/lib/ruby/1.8/singleton.rb:94:in `new'
C:/Ruby187/lib/ruby/1.8/singleton.rb:94:in `instance'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:38:in
`
instantiate_observers'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:36:in
`
each'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:36:in
`
instantiate_observers'
C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:15:
in `define_dispatcher_callbacks'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:
in `call'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:
in `evaluate_method'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:
in `call'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
n `run'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
n `each'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
n `send'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
n `run'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:
in `run_callbacks'
C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:
in `send'
C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:
in `run_prepare_callbacks'
C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:631:in
`prep
are_dispatcher'
C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:185:in
`proc
ess'
C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in
`send
'
C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in
`run'

C:/redmine-1.2.1/config/environment.rb:20
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original
_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
82:in `require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:5
47:in `new_constants_in'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
82:in `require'
C:/redmine-1.2.1/vendor/rails/railties/lib/tasks/misc.rake:4
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in
`call'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in
`execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in
`each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in
`execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in
`invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in
`invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in
`invoke_pre
requisites'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in
`each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in
`invoke_pre
requisites'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in
`invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in
`invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in
`invoke'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in
`inv
oke_task'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in
`top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in
`each
'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in
`top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in
`sta
ndard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in
`top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in
`run'

C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in
`sta
ndard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in
`run'

C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
C:/Ruby187/bin/rake:19:in `load'
C:/Ruby187/bin/rake:19
Tasks: TOP => db:migrate => environment

C:\redmine-1.2.1>
===============================================================

Here is my database.yml file contents:

###############################################################

# MySQL (default setup).

production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: **********
encoding: utf8

development:
adapter: mysql
database: redmine_development
host: localhost
username: root
password:
encoding: utf8

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql
database: redmine_test
host: localhost
username: root
password:
encoding: utf8

test_pgsql:
adapter: postgresql
database: redmine_test
host: localhost
username: postgres
password: "postgres"

test_sqlite3:
adapter: sqlite3
database: db/test.sqlite3

###############################################################

I really need some direction here. It's almost like there is a problem
with my users/passwords. I have changed the passwords not to contain "!"
or any other special characters. I do have capital and lower case
letters.

Any help would be greatly appreciated.

DemiSheep

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

wonderful.
still iffy on this Symbol concept but it seems I am not alone.  rtfm!

On Fri, Sep 30, 2011 at 9:21 AM, Tim Shaffer <timshaffer@me.com> wrote:
The :modified_strategy is just a symbol that tells the helper which method to call on your object to get the name/value of the textarea.

If you want to manually change the value of the textarea, you can overwrite the value attribute:

f.text_area(:modify_strategy , :value => f.object.modify_strategy.gsub(";", "\n"), :cols => 80)

--
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/-/GmpNEk0o4T4J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I installed ruby 1.9.2 using RVM and then used Netbeans to install the latest
rails and gems etc.

However when I create a new rails application and click finish i get the
following error

http://old.nabble.com/file/p32569627/Screen%2BShot%2B2011-09-30%2Bat%2B16.14.01.png
Screen+Shot+2011-09-30+at+16.14.01.png

When I create a new rails project I correctly select the right version of
Ruby to use (1.9.2) and everything else including the gems are all set to
version ruby 1.9.2

Does anyone know whats wrong?

Thanks

Ben Gibson
--
View this message in context: http://old.nabble.com/Rails-on-Netbeans-6.9.1-tp32569627p32569627.html
Sent from the RubyOnRails Users mailing list archive at Nabble.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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

2011/9/30 zver <otobrglez@gmail.com>:
> Hi!
>
> Look at mine Gemfile. Perhapse you find some idea how to set "pg" gem.
>
> https://github.com/otobrglez/mauto/blob/master/Gemfile

As far as I understand the working of heroku deploy, it does not look
at your Gemfile, but at your Gemfile.lock, so if you "bundle install
--without production" (or what ever the command was), pg will not be
in your Gemfile.lock, so heroku does not see it! Same point is for
your rubyracer-gem... So you should make them visible even for your
dev-env.

Its possible that I am wrong, but even then I would prefer to use
postgres in development, so stumble over problems with pg already
locally and dont have to debug with remote when there are any problems
in the pg-implemention.

> - Oto

HTH
Norbert

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Rob Biedenharn wrote in post #1024309:
> You should not need an `id` on the admins table, but you almost
> certainly want to have an index on each of the `file_id` and `user_id`
> columns.

I assume you meant an unique index across both file_id and user_id. In
essence using the two foreign keys as the primary key of the join table.
It would not be sufficient to prevent duplicate records in the join
table with separate indexes on each foreign key.

file_id (PK1, FK1)
user_id (PK2, FK2)

However, IMO it is still best to let ActiveRecord have its unique
surrogate primary key. But, that does not preclude the need for a unique
index spanning the two foreign key columns.

Which ends up looking something like this:

add_index(:admin, [:file_id, :user_id], :unique => true)

In many cases it also does matter which column is listed first in the
index. Try to guess which of the two keys will be the most "selective"
once the database is filled with data. Will users tend to have a lot of
files associated them them, or will files have lots of users? That
depends on how your tables are actually going to be used. List first the
column that will tend to produce the fewest number of rows in the
result, for the majority of your queries.

Here are two examples that I think illustrate join tables well:

This first example is the typical style of join tables used by Rails.
There is actually a good reason for this. In an Object Relational
Mapping (ORM) environment it's really not a bad idea to let the model
classes maintain record identity. That allows ActiveRecord to use its
own built-in mechanism for mapping object instances to database rows.

Note: In order to conform to AR default naming replace relation_id with
id.

CREATE TABLE posts_tags (
relation_id int UNSIGNED NOT NULL AUTO_INCREMENT,
post_id int UNSIGNED NOT NULL,
tag_id int UNSIGNED NOT NULL,
PRIMARY KEY(relation_id),
UNIQUE INDEX(post_id, tag_id)
);

Here is a more traditional table definition. This is what I choose when
not working within an ORM environment (rarely these days):

CREATE TABLE posts_tags (
post_id int UNSIGNED NOT NULL,
tag_id int UNSIGNED NOT NULL,
PRIMARY KEY(post_id, tag_id)
);

These examples were take from:
http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

The :modified_strategy is just a symbol that tells the helper which method to call on your object to get the name/value of the textarea.


If you want to manually change the value of the textarea, you can overwrite the value attribute:

f.text_area(:modify_strategy , :value => f.object.modify_strategy.gsub(";", "\n"), :cols => 80)

--
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/-/GmpNEk0o4T4J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

I would love a full drop-in answer (hand me a fish), but I this might be a matter of pointing me to where I need to RTFM (teach me to fish).

I have a form with a text_area:

<%= f.text_area :modified_strategy, :options=>{:cols => 80} %>

the string represented by :modify_strategy is comprised of a pattern:
<many words>;<more words>;<maybe even more words>;

This string is a representation of what was originally three lines with "\n".
So to properly render them in a text_area I would want to do something like: gsub(";","\n")
and then reverse this in the Model before_save.

Unfortunately something as simple as

... :modifed_strategy.gsub(";", "\n") ...

returns an error:
undefined method `gsub' for :modified_strategy:Symbol

How do I change ";" to "\n" on the string represented by :modified_strategy?
Where to next because I guess I'm really missing something about Symbols or Views.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

On Mon, Sep 19, 2011 at 4:54 PM, Lasse Bunk <lassebunk@gmail.com> wrote:

Use the 'pg' gem:

  gem 'pg'

And in config/database.yml:

  development:
    adapter: postgresql
    database: my_checkins_development
    host: localhost

Taken from a tutorial on my website: http://lassebunk.dk/2011/09/10/creating-a-location-aware-website-using-ruby-on-rails-and-postgis/

/Lasse

Once I changed the adapter to the correct string (postgresql) it worked great.
But I ran into a slightly different question.

I'm struggling with UTF-8 encoding and was wondering if:
1) there is any real difference in postgresql between setting up en_US.UTF-8 and POSIX as far as being able to read/write anything?  I'm thinking the answer is no.
2) when rails creates this database, is there some way I can add options to this yaml file to specify the encoding when it's created?

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi Tom,

I had a similar task lately and the solution goes roughly like this:

First you get the localization file from here:
http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/

You need to load this together with the other jQuery js like this:
<%= javascript_include_tag 'jquery/jquery.ui.datepicker-de.js' %>

After that you can setup you form like this:
<%= label :start_date, "Datum von:" %>
<%= text_field_tag :start_date, Time.now.strftime('%d.%m.
%Y'), :autocomplete => "off", :class => "input_element" %>
<%= label :end_date, "bis:" %>
<%= text_field_tag :end_date, Time.now.strftime('%d.%m.
%Y'), :autocomplete => "off", :class => "input_element" %>
<%= submit_tag :for, :value => t("buttons.search") %>

<script>
$.datepicker.setDefaults( $.datepicker.regional["de"] );
$.datepicker.setDefaults({showWeek: true,
minDate: new Date(2011, 0, 1),
maxDate: "today",
showOtherMonths: true,
selectOtherMonths: true });
$('#start_date').datepicker();
$('

Ruby on Rails

Hi!

Look at mine Gemfile. Perhapse you find some idea how to set "pg" gem.

https://github.com/otobrglez/mauto/blob/master/Gemfile

- Oto


On 30 sep., 09:02, Norbert Melzer <timmel...@googlemail.com> wrote:
> Put postgres in your Gemfile . As far as I remember the Jeromy FAQ points to
> this issue.
>
> HTH Norbert
>
> --
> send by Samsung Galaxy Tab with Overcome Mod
> Am 30.09.2011 07:02 schrieb "The Trystero" <li...@ruby-forum.com>:
>
>
>
>
>
>
>
> > i'm following along with michael hartl's tutorial
> > (http://ruby.railstutorial.org/chapters/a-demo-app#top), creating a demo
> > app.
>
> > i pushed my app/db/data on to heroku (falling-sky-4350.heroku.com/), but
> > am getting an error
>
> > An error occurred in the application and your page could not be served.
> > Please try again in a few moments.
>
> > If you are the application owner, check your logs for details.
>
> > my heroku log is attached. can someone please help me to suss it out?
> > thanks.
>
> > Attachments:
> >http://www.ruby-forum.com/attachment/6643/heroku.error
>
> > --
> > Posted viahttp://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@googlegroups.com.
> > To unsubscribe from this group, send email to
>
> rubyonrails-talk+unsubscribe@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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

Hi,

    There are two places were you should do it:
         - Rails: Best choice is I18N API, summary:
                1. Get the locales you need from https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale
                2. Place them in "config\locales\"
                3. In  "config\aplication.rb" uncomment the lines
                        # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
                        # config.i18n.default_locale = :de
                4. Set your default language, example for Spanish
                        config.i18n.default_locale = :es
                5. Add an the file "nitializers\date_formats.rb" with the content
                        Time::DATE_FORMATS[:default] = lambda { |time| I18n.l(time) }
                        Date::DATE_FORMATS[:default] = lambda { |date| I18n.l(date) }
                6. Restart the server.
        - Datepicker: in the place where you call it add:
                $.timepicker.setDefaults($.timepicker.regional['es']);

    You might want to have different regional settings (included date and time formats) for each users, then the best solution is to place the regional variable in the users models (Examples in the I18N api).

    Just one last think, rails will not raise and error if the format is wrong, instead will save a nil value in the database.

    Greetings,

El 30/09/2011 3:39, Tom Pett escribió:

I recently started using jQuery and the Datepicker with an application of mine.  with the help of http://railscasts.com/episodes/213-calendars I got the datepicker working on a text_field containing a date.  Problem however is when we edit a model. Since a text_field shows the database value for a field by default, it displays the date as '2011-05-24'. When we open te datepicker on this field it defaults to 'today' since it cant read the current value of the field.  Picking a date will display it in the format specified of datepicker, but saving is no problem. I guess Rails is smart enough to figure it out between the I18n.  My question is, how can I make sure my date is displayed in the format I want it to be in the text_field of a form when editting.  

--  Miquel Cubel Escarré +34 699 73 22 46  mcubel@gmail.com

Ruby on Rails

Put postgres in your Gemfile . As far as I remember the Jeromy FAQ points to this issue.

HTH Norbert

--
send by Samsung Galaxy Tab with Overcome Mod

Am 30.09.2011 07:02 schrieb "The Trystero" <lists@ruby-forum.com>:
> i'm following along with michael hartl's tutorial
> (http://ruby.railstutorial.org/chapters/a-demo-app#top), creating a demo
> app.
>
> i pushed my app/db/data on to heroku (falling-sky-4350.heroku.com/), but
> am getting an error
>
> An error occurred in the application and your page could not be served.
> Please try again in a few moments.
>
> If you are the application owner, check your logs for details.
>
>
> my heroku log is attached. can someone please help me to suss it out?
> thanks.
>
> Attachments:
> http://www.ruby-forum.com/attachment/6643/heroku.error
>
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.