[Rails] Connecting to MSSQL with Ruby on Ubuntu
Hello friends, I tried to connect MSSql with Ruby on Ubuntu follow this linkhttp://lambie.org/2008/02/28/connecting-to-an-mssql-database-from-ruby-on-ubuntu/ its working nice. But i tried with Sequel.connect method connection was established but try to fetching data following error was raised irb(main):035:1 DB.synchronize do |conn| irb(main):035:1 end Sequel::DatabaseConnectionError: ODBC::Error: IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified Please give suggestions to resolve this error. Thanks Regards, Dhamodharan N -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] I need help for Gem installation required root password on ubuntu
I have install netbeans 7 ide, then install ruby plugin but when I try to install any gem using the netbeans plugins I am asked for root password of ubuntu, how can I find my root password, because when I use the login password, that doesn't work. I am using ubuntu10.10 desktop. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Show more feature in Rails app
On Apr 19, 2011, at 11:33 PM, daze wrote: You know the very common Older posts/Show more link at the bottom of your Facebook news feed? You know, it functions as a way to show more posts or whatever... it generates more content and allows you to scroll down more. I'm kind of surprised there isn't a nice gem that creates that functionality... After all, it is common. It's kind of like will_paginate, I guess. I would love to make such a gem/plugin myself, but I don't have the experience/skills to This is just a thought to the Rails community - who knows, maybe there's someone out there who's looking for something to do... a plugin/gem like this would be awesome. :] http://railscasts.com/episodes/114-endless-page It's been done! 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How can I remove bundler from my rails 3 app?
On Apr 20, 5:55 am, MJW2529 mjwhite2...@yahoo.com wrote: I'm using jruby 1.6.0 and trying to deploy my rails 3 app to Tomcat. When the app loads I get the error stack level too deep as bundler is trying to resolve dependencies. I've spent hours searching forums in an effort to resolve this but there doesn't seem to be a resolution to this problem. Can someone explain how I can remove bundler from my application so as I can get this deployed? It seems that bundler is tightly integrated with Rails 3. Hopefully Rails is not dependent on it since it makes it impossible to deploy to either Tomcat or the Glassfish server. Not sure about untangling rails 3 from bundler but I did find http://techblog.amphora-research.com/2011/03/tomcat-6-stack-level-too-deep-error-on-windows/# which claims that this is a tomcat problem Fred -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Unable to install Rails through proxy - Rails badly needs to be flexible in its installation
Would appreciate a workaround for this. On Apr 19, 1:58 pm, rubynewbie mohamed.shaf...@gmail.com wrote: Thanks Bryan. I tried this as well as Using a Fiddler as a proxy. But I found that the downloads are being blocked based on the content by the firewall. Generally arbitrary Software Downloads are not permitted in my company. Theres a separate department which manages Software Downloads based on requests they get for it and they provide us with the installables. I have to approach them. But just worried how am I going to explain the Rails packaging / installation procedure to them in order for them to give me a Zip file that has all Rails and its dependent gems. I think I may have to give up. Wouldn't it be great if Rails has all the gems bundled into a single archived file available for download? Thats how most Softwares like Netbeans, Eclipse,Glassfish, JBOSS, Apache, MySQL, Postgre SQL , etc are all delivered. This need not be at the cost doing away with RubyGems installer and the benefits that come with it. Its just about having the archived Rails and its dependencies available for download in the Rails site. Is there a way I can take this as a request to the guys in charge of Rails? Thanks, S On Apr 19, 12:51 am, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:54 AM, rubynewbie mohamed.shaf...@gmail.comwrote: The problem is not inclusion of http:// in the URL(I tried without that). On the contrary I suspect the reason to be on how to specify the domain in the URL. Is my way of specifying the domain right? C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://MYDOMAIN\myUserID:MyPassword@MyProxy:Port I found this on StackOverflow where there were discussing setting the http-proxy environment variable for ISA to install a gem on Windows from behind a proxy. I don't think you need the domain if your admin has specified a default one to authenticate against. However if they have not, one of the comments suggested URI encoding the backslash. So you new string would look like this: http://MYDOMAINhttp://mydomain/%5myUserID:MyPassword@MyProxy:Port http://stackoverflow.com/questions/4418/how-do-i-update-ruby-gems-fro... B. Thanks, S On Apr 18, 6:42 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 4:58 AM, rubynewbie mohamed.shaf...@gmail.com wrote: I am new to Rails and have been facing difficulty while installing rails. I have already installed Ruby and RubyGems on my machine by downloading the packages. But when I install Rails through RubyGems through a HTTP Proxy , I am thrown an error. Below is the details of the command and the exception i am getting : Command Executed : C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://mydomain\myUserID:MyPassword@MyProxy:Port Error thrown : ERROR: While executing gem ... (OptionParser::InvalidArgument) invalid argument: -phttp://myDomain\MyUserID:MyPassword@MyProxy:80 Please note that mydomain is the domain to which my User ID belongs. The authentication is ISA i believe. Would appreciate some help in this. Thanks in advance S Since you are calling an http proxy I don't think you need to specify http:// on the URL. I could be wrong. I don't have a proxy to test against to confirm this. B. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: do a select from another table within a model
On 20 Apr 2011, at 00:12, John Merlino li...@ruby-forum.com wrote: It would appear to me that your immediate problem is the line of code I pointed out above. Yeah I got it now. Basically: if self.class.respond_to? will only respond to class methods of the class, not instance methods and since attr_accessor returns instance methods, that if will return false. So basically what I had to do was: It's simpler than that. blah.respond_to?(:foo) returns true if ruby believes you can do blah.foo, so in particular self.class.respond_to?(:blah) checks (in your case) whether CategoriesController.blah can be called whereas self.respond_to?(:blah) checks whether self.blah would work. method_defined? is a slightly more circuitous route to this and won't always work in a world like rails where methods are often created on the fly from method_missing Fred elsif self.class.method_defined? :blog_filter_scoper And that worked above. And then within my categories controller: def blog_filter_scoper BlogPost.for_posts 1 end That will call the blogpost named scope and pass the argument 1 so now depending on which controller is invoked, we can pass different arguments to for_posts to determine which posts to display. The only thing I don't like now about this is that I am passing an integer 1. I'd rather do something like Category[:news].id - where rails will search the categories table with news value and then pull the id of that value which could be 1. I think that's better than hardcoding 1 right there. I guess that's the next thing I need to figure out. Thanks for all responses. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rich text editor?
Correction, just checked and doesn't look like I used a plugin so can't say how good plugin is! On Apr 20, 8:24 am, tonypm tonypmar...@hotmail.com wrote: I have used CKEditor for some time with no problems, I have one page with several editor instances and it works fine. There is a rails pluginhttps://github.com/standout/rails-ckeditor I think this is the one I used Tony -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: How can I remove bundler from my rails 3 app?
No, Bundler is not really coupled. Just delete de Gemfile and you're done. Having said that, I'd try to reach the bundler guys with a minimal app the shows your issue. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] No route matches / and rake routes empty
On 20 April 2011 00:35, Peter Akkies li...@ruby-forum.com wrote: Hello, I am upgrading my Rails application from Rails 2 to Rails 3 and I'm having troubles getting routes.rb to work. I get the following error when I visit my application: [code] Routing Error No route matches / [/code] When I run rake routes, the output is blank. What I have already done: - Googled and searched this forum for the problem - Checked that routes.rb is in the correct location - Created a syntax error in routes.rb--the error is recognized, so the file is loaded - I removed public/index.html - I have gone through my routes.rb and think it has the correct syntax Here is my routes.rb file: http://pastie.org/private/gi1js8shnuqt3tncxglxw My rails 3 app routes .rb starts MyAppName::Application.routes.draw do yours has no draw. Could this be the issue? 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Unable to install Rails using Gem
On Apr 16, 1:48 am, Bryan Crossland bacrossl...@gmail.com wrote: On Fri, Apr 15, 2011 at 5:18 AM, Shafeeq mohamed.shaf...@gmail.com wrote: On Apr 14, 4:46 pm, Michael Pavling pavl...@gmail.com wrote: On 14 April 2011 12:30, Shafeeq mohamed.shaf...@gmail.com wrote: The question is quite simple. But the answer to simple questions is frequently much more complicated... Is there a way I can package Rails gem and all its dependencies (in a machine where I have internet connection) into a single file to be FTPed to the server (where I dont have internet) for installation? Yes. You can download all the dependent gems from rubygems.org. Zip them into one file, and ftp them Do i have to locate the gem files manually in order to zip them into a single file? Say i run gem dependency -r rails which returns me a list of say 100 gems. These gems are located in a directory where there are already 1000 gem files which includes these Rails and its dependent files also. Do I have to browse through the file system manually to locate these 100 rails dependent gem files(from the already existing 1000 files) in order to package/zip them into a single file? Wouldn't that be painful? Is there an automated way of packaging the gem files which would take the output from gem dependency -r rails and package them into a single file? Thanks, S Thanks. When you said I can download all the dependent gems and zip them, do i have to download them all manually from rubygems.org using a browser? Or if I choose to download them all through RubyGems installer whats the path where I can find all the downloaded gems in the rails installation location? No you don't have to download through a browser from rubygems.org. You can download them through the gem installer. You can find the location of where a gem is installed on your system by running the following command: gem which name_of_gem If the Gems are present at a location where there are lots of other non-Rails Gems, then wouldn't it be very painful to segregate the Rails Gems? There will be lots of gems installed on your system for different reasons. No it is not painful to segregate them. You can see a list of the gems that Rails has a dependency on by running the following command: gem dependency rails The gem installer is your best tool. Take the time to read the manuals which will give you more than enough information on the above questions you have and more. http://docs.rubygems.org/ I wish there was a simpler way like all the Rails Gems packaged into one bundle available for download. This is in addition to the existing way of installation. This is about having an additional option to a valid situation where you can install do an installation over the internet. The easier way is the gem installer whether you are connected to the internet or you have a copy of the gem package file you transferred onto your server from another machine. The gem installer does not need the internet to install a gem. You just have to have the gem you want to install. Where are all the packages that you need to install Rails? rubygems.org. And now the argument has come full circle. B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Couldn't find Comment without an ID
On 19 Apr 2011, at 23:47, Neil Bye li...@ruby-forum.com wrote: Frederick Cheung wrote in post #993841: On Apr 19, 8:39pm, Neil Bye li...@ruby-forum.com wrote: Tim Shaffer wrote in post #993815: sounds to me like params[:id] isn't set. Fred Not sure what you mean. How would I set params[:id] ? Typically it will come from the form or the URL, but if you try and use it when it's not set, things will blow up. It works if I use params[:user_id] or [:current_user_id] Surely the pproblem is that it doesn't know which comment it is supposed to be subcommenting on. That us precisely it - you're trying to create the subcomment on the comment fetched by params[:id], but params[:id] isn't set This is what calls it, is there a problem here. %= form_for :subcomment, :remote = true, :url = user_subcomments_path(@user) do |form| % %= form.text_field :body % p%= submit_tag 'Comment' %/p % end % Yes - nothing in this form says which comment the newly created subcomment belongs to. In general you can either use a hidden_field with the id or make it part of the URL, eg as a nested resource (in which case params[:comment_id] would contain the correct value). I would normally have comment_subcomments_path(@comment) (assuming @comment is what the user wants to comment on) rather than user_subcomments_path(@user) with a hidden field with the comment_id because the user creating an object is usually obtainable via your login system (indeed in most cases you don't want people to be able to create subcomments as other users just by editing the URL the form posts to) Fred -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Composite index via command line migration, different behaviour in file
On 19 Apr 2011, at 22:13, Federico federico.rot...@gmail.com wrote: Hello everybody, I have a class like this: class Foos ActiveRecord::Migration def self.up create_table :foos,:id = false, do |t| t.references :table1 t.references :table2 t.timestamps end end def self.down drop_table :foos end end I would like to add a composite index on the 2 columns :table1 and :table2 but the command rails generate migration add_index(:foos, [:table1_id, :table2_id], :unique = true) fails with the following output: Missing type for attribute '='. Example: '=:string' where string is the type. If I edit the up method of Foos like this: def self.up create_table :foos,:id = false, do |t| t.references :table1 t.references :table2 t.timestamps end add_index(:foos, [:table1_id, :table2_id], :unique = true) end then the index is successfully created. I can't understand why. I would like to create this composite index with a migration from command line. As far as I know there just isn't a command line shortcut for creating such a migration - create a blank one with rails g migration AddAnIndexToFoos And add your call to add_index in there. Fred Thanks Federico -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: my app ignore default_locale
On 20 Apr 2011, at 05:15, iEmpire razor@gmail.com wrote: If I run the app via `rails server` everything is ok... Did you restart passenger (by touching your_app/tmp/restart.txt) after making the change Fred On Apr 19, 10:20 pm, iEmpire razor@gmail.com wrote: In application.rb i defined: config.i18n.default_locale = :ru But all texts on the site are in English. Typus interface is in English too and when I delete config/locales/en.yml it prints can not load translations from /home/kir/rails/tftc/config/locales/en.yml My server: Apache and Passenger 3. Apache config: VirtualHost *:80 ServerName mysite.com DocumentRoot /home/user/rails/tftc/public RailsEnv development Directory /home/user/rails/tftc/public AllowOverride all Options -MultiViews /Directory /VirtualHost Why Rails 3 ignore the default_locale option? -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Unable to install Rails through proxy - Rails badly needs to be flexible in its installation
On 20 Apr 2011, at 08:25, rubynewbie mohamed.shaf...@gmail.com wrote: Would appreciate a workaround for this. Do the install on a non hobbled computer and then copy the gems across ? (rubygems stashes a copy of the .gem files somewhere if my memory is correct). You could also run gem server on this hypothetical machine with the gems installed - this spawns a server capable of serving gems, you'd just need to tell your ruby install to use it with the gem sources command Fred On Apr 19, 1:58 pm, rubynewbie mohamed.shaf...@gmail.com wrote: Thanks Bryan. I tried this as well as Using a Fiddler as a proxy. But I found that the downloads are being blocked based on the content by the firewall. Generally arbitrary Software Downloads are not permitted in my company. Theres a separate department which manages Software Downloads based on requests they get for it and they provide us with the installables. I have to approach them. But just worried how am I going to explain the Rails packaging / installation procedure to them in order for them to give me a Zip file that has all Rails and its dependent gems. I think I may have to give up. Wouldn't it be great if Rails has all the gems bundled into a single archived file available for download? Thats how most Softwares like Netbeans, Eclipse,Glassfish, JBOSS, Apache, MySQL, Postgre SQL , etc are all delivered. This need not be at the cost doing away with RubyGems installer and the benefits that come with it. Its just about having the archived Rails and its dependencies available for download in the Rails site. Is there a way I can take this as a request to the guys in charge of Rails? Thanks, S On Apr 19, 12:51 am, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:54 AM, rubynewbie mohamed.shaf...@gmail.comwrote: The problem is not inclusion of http:// in the URL(I tried without that). On the contrary I suspect the reason to be on how to specify the domain in the URL. Is my way of specifying the domain right? C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://MYDOMAIN\myUserID:MyPassword@MyProxy:Port I found this on StackOverflow where there were discussing setting the http-proxy environment variable for ISA to install a gem on Windows from behind a proxy. I don't think you need the domain if your admin has specified a default one to authenticate against. However if they have not, one of the comments suggested URI encoding the backslash. So you new string would look like this: http://MYDOMAINhttp://mydomain/%5myUserID:MyPassword@MyProxy:Port http://stackoverflow.com/questions/4418/how-do-i-update-ruby-gems-fro... B. Thanks, S On Apr 18, 6:42 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 4:58 AM, rubynewbie mohamed.shaf...@gmail.com wrote: I am new to Rails and have been facing difficulty while installing rails. I have already installed Ruby and RubyGems on my machine by downloading the packages. But when I install Rails through RubyGems through a HTTP Proxy , I am thrown an error. Below is the details of the command and the exception i am getting : Command Executed : C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://mydomain\myUserID:MyPassword@MyProxy:Port Error thrown : ERROR: While executing gem ... (OptionParser::InvalidArgument) invalid argument: -phttp://myDomain\MyUserID:MyPassword@MyProxy:80 Please note that mydomain is the domain to which my User ID belongs. The authentication is ISA i believe. Would appreciate some help in this. Thanks in advance S Since you are calling an http proxy I don't think you need to specify http:// on the URL. I could be wrong. I don't have a proxy to test against to confirm this. B. -- 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Barry Flower is out of the office
I will be out of the office starting 20/04/2011 and will not return until 28/04/2011. Please contact Brad Parsons as my delegate on +612 8254 1557 or +61 (0) 419 757 068 or if urgent I can be contacted on +61 (0) 439 467 971 Unless otherwise stated, this email is confidential. If received in error, please delete and inform the sender by return email. Unauthorised use, copying or distribution is prohibited. Westpac Banking Corporation (ABN 33 007 457 141) is not responsible for viruses, or for delays, errors or interception in transmission. Unless stated or apparent from its terms, any opinion is not the opinion of Westpac Banking Corporation. This message also includes information on Westpac Institutional Bank available at westpac.com.au/wibinfo -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Rails 3 Migration expecting test gems to be installed??
On 19 Apr 2011, at 11:30, johnnybutler7 johnnybutl...@gmail.com wrote: Aha thanks, i knew it would be something silly. The docs do suggest adding the gemfile.lock to your repository but based on this evidence thats not a good idea. I will need to find out how to manage this when deploying, do you add the production gemfile.lock to the repo I've never had to do this (and I seen to have many of the test gems you do (rspec , cucumber etc) Fred On Apr 18, 2:50 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 5:43 AM, johnnybutler7 johnnybutl...@gmail.comwrote: Yes i did bundle install --without test and that worked fine, when i try the db migrate for staging i get the error, i could install all the gems as you say rspec is needed for other stuff possibly but the actual error for the autotest gem is because its specific to mac, the staging site is on linux. From reading the docs it seems to suggest that bundler will know what OS you are on and install the appropriate gem. The whole point of the grouping should be exactly for this reason, i shouldnt have to install test/dev gems on the staging/production server. Maybe its something silly im doing but but i can see what. You didn't happen to move over your Gemfile.lock from your mac to your staging server did you? If you did, try deleting that file and running the command again. B. On Apr 18, 11:16 am, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 15, 2:01 pm, johnnybutler7 johnnybutl...@gmail.com wrote: Hi, I have gem file set up so only the specific gems are installed/needed for each environment, so all the test gems like cucumber etc are grou[ed in test. When i try a rake db:migrate RAILS_ENV=staging on the staging server however i get an error saying gem is not installed, please use bundle install. I dont want the test gems installed on this server however when i run the migration on staging its expecting them to be installed. Anyone hit this problem before and how did you sort it, i cant find anything in the forums? did you run bundle install --without test --without development Some gems (like rspec) used to generate rake files that required rspec to be loaded, so when rails tried to load your rake tasks it would fail if those gems weren't there anymore. They don't anymore though, now that everyone has figured out the sensible ways of working with bundler - I'd try using a current versions of those gems and clearing out any unneeded rake task files. Fred JB -- 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Form's and Actions.
On 19 Apr 2011, at 07:52, Niklas Nson niklasn...@meantime.se wrote: Have the following form: %= simple_form_for @user, :as = :user, :action = edit_notification do |f| -% %= f.input :email % %= f.input :email_alerts % %= f.input :email_summarize % %= f.input :email_newsletter % %= f.input :email_announcements % %= f.button :submit % % end % It should trigger the edit_notification action ? But it triggers the standard edit action. Do i have to add more routes then: resources :users to get it to trigger ? To override the default URL that a form posts to, you need to say something along the lines of :url = {:action = 'blah', :id = @user.id} You don't have to create a route for it, but it's generally neater to do so Fred This is driving me mad at the time. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] sqlite db adding garbage
Hello guys After figuring out a way to load my db with info scraped of from a web page, the data on db is appended with --- \n - these characters. I'm not sure what the problem is.. I did change my editor to xcode. I have attached my app's - migration file - the method that is called to populate the database - the output on rails server You can see I'm specifically printing out the values like (eg: [item[0]]) before assigning it to dts.bug_id or any other db row for that matter. I can see the printed value is fine but after storing on the database they are being appended with those junk characters. Have anyone of you noticed this before. Am I doing something wrong..please help !! Thanks in advance -- Anush class CreateBugs ActiveRecord::Migration def self.up create_table :bugs do |t| t.string :bug_id t.string :bug_pri t.string :bug_sev t.string :bug_state t.string :bug_date t.string :bug_org t.string :bug_asg t.string :bug_sum t.string :bug_fcomment t.string :bug_fdate t.timestamps end end def self.down drop_table :bugs end end def scrap_dts puts Inside def scrap_dts in import controller agent = Mechanize.new agent.basic_auth('anushj', 'porfavor') page = agent.get('http://hidden/query.cgi?action=searchname=anushjorigin=mepriority=1report_type=0severity=1subreport_id=46') table = agent.page.search('//*[(@id = subreport_list)]//td').map(:text).map(:strip) table = table.split('Bug') table.delete_if{|x| x.size == 0} table.each do |item| tmp = [item[0]] tmp = tmp.split('-') if Bug.find_by_bug_id(tmp[0]).nil? dts = Bug.new dts.bug_id = tmp[0] puts tmp[0] dts.bug_pri = [item[2]] puts [item[2]] dts.bug_sev = [item[4]] puts [item[4]] dts.bug_state = [item[5]] puts [item[5]] dts.bug_date = [item[6]] puts [item[6]] dts.bug_org = [item[9]] puts [item[9]] dts.bug_asg = [item[10]] puts [item[10]] dts.save puts save record! #dts_num = [item[0]] #puts dts_num end end end DB O/P while executing scrap_dts Inside def scrap_dts in import controller 106083-M30S P1 S1 New 2011/02/16 anushj mmourier save record! 115412-M30S P1 S1 Closed: Verified 2011/04/05 anushj anushj save record! 115762-M30S P1 S1 Closed: Verified 2011/04/11 anushj anushj save record! Started GET / for 127.0.0.1 at 2011-04-19 23:37:33 -0700 Processing by ImportController#index as HTML Bug Load (0.3ms) SELECT bugs.* FROM bugs WHERE bugs.bug_id IN ('106083-M30S') LIMIT 1 Bug Load (0.2ms) SELECT bugs.id FROM bugs WHERE (bugs.bug_id = '[106083-M30S]') LIMIT 1 AREL (0.4ms) INSERT INTO bugs (bug_id, bug_pri, bug_sev, bug_state, bug_date, bug_org, bug_asg, bug_sum, bug_fcomment, bug_fdate, created_at, updated_at) VALUES ('--- - 106083-M30S ', '--- - P1 ', '--- - S1 ', '--- - New ', '--- - 2011/02/16 ', '--- - anushj ', '--- - mmourier ', NULL, NULL, NULL, '2011-04-20 06:37:35.112929', '2011-04-20 06:37:35.112929') Bug Load (0.3ms) SELECT bugs.* FROM bugs WHERE bugs.bug_id IN ('115412-M30S') LIMIT 1 Bug Load (0.1ms) SELECT bugs.id FROM bugs WHERE (bugs.bug_id = '[115412-M30S]') LIMIT 1 AREL (0.3ms) INSERT INTO bugs (bug_id, bug_pri, bug_sev, bug_state, bug_date, bug_org, bug_asg, bug_sum, bug_fcomment, bug_fdate, created_at, updated_at) VALUES ('--- - 115412-M30S ', '--- - P1 ', '--- - S1 ', '--- - Closed: Verified ', '--- - 2011/04/05 ', '--- - anushj ', '--- - anushj ', NULL, NULL, NULL, '2011-04-20 06:37:35.124746', '2011-04-20 06:37:35.124746') Bug Load (0.2ms) SELECT bugs.* FROM bugs WHERE bugs.bug_id IN ('115762-M30S') LIMIT 1 Bug Load (0.1ms) SELECT bugs.id FROM bugs WHERE (bugs.bug_id = '[115762-M30S]') LIMIT 1 AREL (0.4ms) INSERT INTO bugs (bug_id, bug_pri, bug_sev, bug_state, bug_date, bug_org, bug_asg, bug_sum, bug_fcomment, bug_fdate, created_at, updated_at) VALUES ('--- - 115762-M30S ', '--- - P1 ', '--- - S1 ', '--- - Closed: Verified ', '--- - 2011/04/11 ', '--- - anushj ', '--- - anushj ', NULL, NULL, NULL, '2011-04-20 06:37:35.129591', '2011-04-20 06:37:35.129591') Bug Load (3.9ms) SELECT bugs.* FROM bugs SQL (0.2ms) SELECT COUNT(*) FROM bugs Rendered import/index.html.erb within layouts/application (46.3ms) Completed 200 OK in 1769ms (Views: 51.0ms | ActiveRecord: 6.2ms) -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: sqlite db adding garbage
On Apr 20, 9:18 am, Anush J. li...@ruby-forum.com wrote: Hello guys After figuring out a way to load my db with info scraped of from a web page, the data on db is appended with --- \n - these characters. I'm not sure what the problem is.. I did change my editor to xcode. I have attached my app's - migration file - the method that is called to populate the database - the output on rails server You can see I'm specifically printing out the values like (eg: [item[0]]) before assigning it to dts.bug_id or any other db row for that matter. I can see the printed value is fine but after storing on the database they are being appended with those junk characters. Have anyone of you noticed this before. Am I doing something wrong..please help !! You've got a bunch of string columns but you're assigning arrays to them (such as [item[0]]), which forces activerecord to encode them as yaml which is what causes the extra characters you are seeing - that how yaml encodes arrays. If you did want to do this you should use the serialize directive to inform activerecord that those columns should be serialized/deserialized. If not, then just assign item[0] rather than [item[0]] Fred Fred Thanks in advance -- Anush class CreateBugs ActiveRecord::Migration def self.up create_table :bugs do |t| t.string :bug_id t.string :bug_pri t.string :bug_sev t.string :bug_state t.string :bug_date t.string :bug_org t.string :bug_asg t.string :bug_sum t.string :bug_fcomment t.string :bug_fdate t.timestamps end end def self.down drop_table :bugs end end def scrap_dts puts Inside def scrap_dts in import controller agent = Mechanize.new agent.basic_auth('anushj', 'porfavor') page = agent.get('http://hidden/query.cgi?action=searchname=anushjorigin=mepriority=...) table = agent.page.search('//*[(@id = subreport_list)]//td').map(:text).map(:strip) table = table.split('Bug') table.delete_if{|x| x.size == 0} table.each do |item| tmp = [item[0]] tmp = tmp.split('-') if Bug.find_by_bug_id(tmp[0]).nil? dts = Bug.new dts.bug_id = tmp[0] puts tmp[0] dts.bug_pri = [item[2]] puts [item[2]] dts.bug_sev = [item[4]] puts [item[4]] dts.bug_state = [item[5]] puts [item[5]] dts.bug_date = [item[6]] puts [item[6]] dts.bug_org = [item[9]] puts [item[9]] dts.bug_asg = [item[10]] puts [item[10]] dts.save puts save record! #dts_num = [item[0]] #puts dts_num end end end DB O/P while executing scrap_dts Inside def scrap_dts in import controller 106083-M30S P1 S1 New 2011/02/16 anushj mmourier save record! 115412-M30S P1 S1 Closed: Verified 2011/04/05 anushj anushj save record! 115762-M30S P1 S1 Closed: Verified 2011/04/11 anushj anushj save record! Started GET / for 127.0.0.1 at 2011-04-19 23:37:33 -0700 Processing by ImportController#index as HTML Bug Load (0.3ms) SELECT bugs.* FROM bugs WHERE bugs.bug_id IN ('106083-M30S') LIMIT 1 Bug Load (0.2ms) SELECT bugs.id FROM bugs WHERE (bugs.bug_id = '[106083-M30S]') LIMIT 1 AREL (0.4ms) INSERT INTO bugs (bug_id, bug_pri, bug_sev, bug_state, bug_date, bug_org, bug_asg, bug_sum, bug_fcomment, bug_fdate, created_at, updated_at) VALUES ('--- - 106083-M30S ', '--- - P1 ', '--- - S1 ', '--- - New ', '--- - 2011/02/16 ', '--- - anushj ', '--- - mmourier ', NULL, NULL, NULL, '2011-04-20 06:37:35.112929', '2011-04-20 06:37:35.112929') Bug Load (0.3ms) SELECT bugs.* FROM bugs WHERE bugs.bug_id IN ('115412-M30S') LIMIT 1 Bug Load (0.1ms) SELECT bugs.id FROM bugs WHERE (bugs.bug_id = '[115412-M30S]') LIMIT 1 AREL (0.3ms) INSERT INTO bugs (bug_id, bug_pri, bug_sev, bug_state, bug_date, bug_org, bug_asg, bug_sum, bug_fcomment, bug_fdate, created_at, updated_at) VALUES ('--- - 115412-M30S ', '--- - P1 ', '--- - S1 ', '--- - Closed: Verified ', '--- - 2011/04/05 ', '--- - anushj ', '--- - anushj ', NULL, NULL, NULL, '2011-04-20 06:37:35.124746', '2011-04-20 06:37:35.124746') Bug Load (0.2ms) SELECT bugs.* FROM bugs WHERE bugs.bug_id IN ('115762-M30S') LIMIT 1 Bug Load (0.1ms) SELECT bugs.id FROM bugs WHERE (bugs.bug_id = '[115762-M30S]') LIMIT 1 AREL (0.4ms) INSERT INTO bugs (bug_id, bug_pri, bug_sev, bug_state, bug_date, bug_org, bug_asg, bug_sum, bug_fcomment, bug_fdate, created_at, updated_at) VALUES ('--- - 115762-M30S ', '--- - P1 ', '--- - S1 ', '--- - Closed: Verified ', '--- - 2011/04/11 ', '--- - anushj ', '--- - anushj ', NULL, NULL, NULL, '2011-04-20 06:37:35.129591', '2011-04-20 06:37:35.129591') Bug Load (3.9ms) SELECT bugs.* FROM bugs SQL (0.2ms) SELECT COUNT(*) FROM bugs Rendered import/index.html.erb within
[Rails] Re: Re: Couldn't find Comment without an ID
%= form_for :subcomment, :remote = true, :url = user_subcomments_path(@user) do |form| % %= form.text_field :body % p%= submit_tag 'Comment' %/p % end % comment_subcomments_path(@comment) (assuming @comment is what the user wants to comment on) rather than user_subcomments_path(@user) with a hidden field with the comment_id because the user creating an object is usually obtainable via your login system (indeed in most cases you don't want people to be able to create subcomments as other users just by editing the URL the form posts to) Ok I see your point but now I run into a routes problem which doesn't come up if I use user_subcomments_path(@user) When I use 'comment_subcomments_path(@comment)' I get 'No route matches {:controller=subcomments}' Of course subcomments_controller exists This is from routes.rb resources :comments resources :subcomments resources :users resources :users do resources :comments end resources :comments do resources :subcomments end resources :users do resources :subcomments end -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: my app ignore default_locale
Yes. Also I tried to run my app on another server with simmilar configuration, but no result. On Apr 20, 11:42 am, Frederick Cheung frederick.che...@gmail.com wrote: On 20 Apr 2011, at 05:15, iEmpire razor@gmail.com wrote: If I run the app via `rails server` everything is ok... Did you restart passenger (by touching your_app/tmp/restart.txt) after making the change Fred On Apr 19, 10:20 pm, iEmpire razor@gmail.com wrote: In application.rb i defined: config.i18n.default_locale = :ru But all texts on the site are in English. Typus interface is in English too and when I delete config/locales/en.yml it prints can not load translations from /home/kir/rails/tftc/config/locales/en.yml My server: Apache and Passenger 3. Apache config: VirtualHost *:80 ServerName mysite.com DocumentRoot /home/user/rails/tftc/public RailsEnv development Directory /home/user/rails/tftc/public AllowOverride all Options -MultiViews /Directory /VirtualHost Why Rails 3 ignore the default_locale option? -- 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+unsubscr...@googlegroups.com. For more options, visit this group athttp://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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Couldn't find Comment without an ID
On Apr 20, 10:40 am, Neil Bye li...@ruby-forum.com wrote: %= form_for :subcomment, :remote = true, :url = user_subcomments_path(@user) do |form| % %= form.text_field :body % p%= submit_tag 'Comment' %/p % end % comment_subcomments_path(@comment) (assuming @comment is what the user wants to comment on) rather than user_subcomments_path(@user) with a hidden field with the comment_id because the user creating an object is usually obtainable via your login system (indeed in most cases you don't want people to be able to create subcomments as other users just by editing the URL the form posts to) Ok I see your point but now I run into a routes problem which doesn't come up if I use user_subcomments_path(@user) When I use 'comment_subcomments_path(@comment)' I get 'No route matches {:controller=subcomments}' have you tried form_for [@comment, :subcomment] ? This will make sure that the http method etc is right for creating a new comment Fred Of course subcomments_controller exists This is from routes.rb resources :comments resources :subcomments resources :users resources :users do resources :comments end resources :comments do resources :subcomments end resources :users do resources :subcomments end -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Omniauth facebook authentication failure
I am using devise and omniauth for authentication. Wherever i click on the facebook login button i get this warning msg. ** warning: peer certificate won't be verified in this SSL session ** But now i get this error msg * OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed What am i doing wrong? -- Routes.rb -- get /auth/:provider/callback = authentications#create In my config/initializers/omniauth.rb - Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, '', '' provider :facebook, 'appid', 'appsecret', {:scope='publish_stream,email'} end - In my authentications controller - def create omniauth = request.env[omniauth.auth] #search if user has been authenticated and application has been authorised authenticate = Authentication.find_by_provider_and_uid(params['provider'], omniauth['uid']) #if user has signed in with that provider before, sign user in and show the requested page if authenticate sign_in_and_redirect(:user, authenticate.user) flash[:notice] = Authentication successful!! #create new user else user = User.new user.apply_omniauth(omniauth) case omniauth['provider'] when 'facebook' if user.save user.profile = Profile.new user.profile.picture_url = https://graph.facebook.com/+omniauth['uid']+/picture # user.profile.location = omniauth['extra']['user_hash']['location']['name'] # user.profile.gender = omniauth['extra']['user_hash']['gender'] #save users profile if user.profile.save flash[:notice] = Signed in with +omniauth['provider'] #sign user in sign_in_and_redirect(:user, user) end else redirect_to root_url, :notice = Authentication failed, please try again! end when 'twitter' session[:omniauth] = omniauth.except('extra') redirect_to #{root_url}confirm-email end end #close of if statement end #close of method In models/user --- def apply_omniauth(omniauth) case omniauth['provider'] when 'facebook' self.email = omniauth['user_info']['email'] end self.username = omniauth['user_info']['nickname'] if username.blank? self.name = omniauth['user_info']['name'] if name.blank? authentications.build(:provider=omniauth['provider'], :uid=omniauth['uid'], :token =(omniauth['credentials']['token'] rescue nil)) end --- Please is there anything am doing wrong. Because it was working perfectly locally and even on my heroku host until it started giving me this error message -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Unable to install Rails through proxy - Rails badly needs to be flexible in its installation
On Apr 20, 12:46 pm, Frederick Cheung frederick.che...@gmail.com wrote: On 20 Apr 2011, at 08:25, rubynewbie mohamed.shaf...@gmail.com wrote: Would appreciate a workaround for this. Do the install on a non hobbled computer and then copy the gems across ? Do i have to locate the gem files manually in order to zip them into a single file to be installed elsewhere? Say i run gem dependency -r rails which returns me a list of say 100 gems. These gems are located in a directory where there are already 1000 gem files which includes these Rails and its dependent files also. Do I have to browse through the file system manually to locate these 100 rails dependent gem files(from the already existing 1000 files) in order to package/zip them into a single file? Wouldn't that be painful? Is there an automated way of packaging the gem files which would take the output from gem dependency -r rails and package them into a single file? Thanks for taking the time to answer. Much appreciated. (rubygems stashes a copy of the .gem files somewhere if my memory is correct). You could also run gem server on this hypothetical machine with the gems installed - this spawns a server capable of serving gems, you'd just need to tell your ruby install to use it with the gem sources command Fred On Apr 19, 1:58 pm, rubynewbie mohamed.shaf...@gmail.com wrote: Thanks Bryan. I tried this as well as Using a Fiddler as a proxy. But I found that the downloads are being blocked based on the content by the firewall. Generally arbitrary Software Downloads are not permitted in my company. Theres a separate department which manages Software Downloads based on requests they get for it and they provide us with the installables. I have to approach them. But just worried how am I going to explain the Rails packaging / installation procedure to them in order for them to give me a Zip file that has all Rails and its dependent gems. I think I may have to give up. Wouldn't it be great if Rails has all the gems bundled into a single archived file available for download? Thats how most Softwares like Netbeans, Eclipse,Glassfish, JBOSS, Apache, MySQL, Postgre SQL , etc are all delivered. This need not be at the cost doing away with RubyGems installer and the benefits that come with it. Its just about having the archived Rails and its dependencies available for download in the Rails site. Is there a way I can take this as a request to the guys in charge of Rails? Thanks, S On Apr 19, 12:51 am, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:54 AM, rubynewbie mohamed.shaf...@gmail.comwrote: The problem is not inclusion of http:// in the URL(I tried without that). On the contrary I suspect the reason to be on how to specify the domain in the URL. Is my way of specifying the domain right? C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://MYDOMAIN\myUserID:MyPassword@MyProxy:Port I found this on StackOverflow where there were discussing setting the http-proxy environment variable for ISA to install a gem on Windows from behind a proxy. I don't think you need the domain if your admin has specified a default one to authenticate against. However if they have not, one of the comments suggested URI encoding the backslash. So you new string would look like this: http://MYDOMAINhttp://mydomain/%5myUserID:MyPassword@MyProxy:Port http://stackoverflow.com/questions/4418/how-do-i-update-ruby-gems-fro... B. Thanks, S On Apr 18, 6:42 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 4:58 AM, rubynewbie mohamed.shaf...@gmail.com wrote: I am new to Rails and have been facing difficulty while installing rails. I have already installed Ruby and RubyGems on my machine by downloading the packages. But when I install Rails through RubyGems through a HTTP Proxy , I am thrown an error. Below is the details of the command and the exception i am getting : Command Executed : C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://mydomain\myUserID:MyPassword@MyProxy:Port Error thrown : ERROR: While executing gem ... (OptionParser::InvalidArgument) invalid argument: -phttp://myDomain\MyUserID:MyPassword@MyProxy:80 Please note that mydomain is the domain to which my User ID belongs. The authentication is ISA i believe. Would appreciate some help in this. Thanks in advance S Since you are calling an http proxy I don't think you need to specify http:// on the URL. I could be wrong. I don't have a proxy to test against to confirm this. B. -- 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
[Rails] Re: Couldn't find Comment without an ID
have you tried form_for [@comment, :subcomment] ? This will make sure that the http method etc is right for creating a new comment Fred I now have: %= form_for [@comment, :subcomment], :remote = true, :url = comment_subcomments_path(@comment) do |form| % %= form.text_field :body % % end % But sill get the No route matches {:controller=subcomments} Confused Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails and mod_rewrite
Hi, We've recently built a CMS app that will host quite a few sites, the sites can currently be accessed as follows: example.com/siteone/home example.com/sitetwo/home I've created an Apache vhost to handle 'siteone.com', pointed it to the 'public' folder of the app and it uses the following rewrite rule to access the correct path: RewriteRule ^/$ http://siteone.com/siteone/home Thing is I'd like it to access 'http://siteone.com/siteone/home', but only display 'http://siteone.com/'. I've tried a few rules but aren't sure how I should go about this. How does mod_rewrite see '^/siteone/home' in a rails app? As a query string? Any advice/assistance would be much appreciated. Thanks, Charl -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Couldn't find Comment without an ID
On Apr 20, 11:44 am, Neil Bye li...@ruby-forum.com wrote: have you tried form_for [@comment, :subcomment] ? This will make sure that the http method etc is right for creating a new comment Fred I now have: %= form_for [@comment, :subcomment], :remote = true, :url = comment_subcomments_path(@comment) do |form| % %= form.text_field :body % % end % But sill get the No route matches {:controller=subcomments} Sorry, that was wrong - it should be form_for [@comment, Subcomment.new], you don't need the :url option You should also make sure that @comment is set to the comment to which subcomments should be added to Fred Confused Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] ActiveMerchant with Amazon's FPS
Hi, I want to integrate Amazon's FPS service using Activemerchant. I want to know that activemerchant support that? and if yes, then can you please suggest any site to integrate Amazon's FPS? -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] rails new project
Hi, I have a weird problem that i could not understand. When i write `rails new project` on the terminal it puts me help of rails command. * i use mac osx * ruby works well * gem works well * i uninstalled rails gem and installed again As you see: Mehmet-Davuts-MacBook-Pro:Desktop davit$ rails new project Usage: rails new APP_PATH [options] Options: -J, [--skip-prototype] # Skip Prototype files -T, [--skip-test-unit] # Skip Test::Unit files -G, [--skip-git]# Skip Git ignores and keeps -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) [--dev] # Setup the application with Gemfile pointing to your Rails checkout -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) [--edge]# Setup the application with Gemfile pointing to Rails repository [--skip-gemfile]# Don't create a Gemfile -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/bin/ruby -O, [--skip-active-record] # Skip Active Record files Runtime options: -q, [--quiet]# Supress status output -s, [--skip] # Skip files that already exist -f, [--force]# Overwrite files that already exist -p, [--pretend] # Run but do not make any changes Rails options: -v, [--version] # Show Rails version number and quit -h, [--help] # Show this help message and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/ weblog. See the README in the newly created application to get going. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Unable to install Rails through proxy - Rails badly needs to be flexible in its installation
On Apr 20, 11:41 am, rubynewbie mohamed.shaf...@gmail.com wrote: On Apr 20, 12:46 pm, Frederick Cheung frederick.che...@gmail.com wrote: On 20 Apr 2011, at 08:25, rubynewbie mohamed.shaf...@gmail.com wrote: Would appreciate a workaround for this. Do the install on a non hobbled computer and then copy the gems across ? Do i have to locate the gem files manually in order to zip them into a single file to be installed elsewhere? Say i run gem dependency -r rails which returns me a list of say 100 gems. These gems are located in a directory where there are already 1000 gem files which includes these Rails and its dependent files also. Do I have to browse through the file system manually to locate these 100 rails dependent gem files(from the already existing 1000 files) in order to package/zip them into a single file? Wouldn't that be painful? Is there an automated way of packaging the gem files which would take the output from gem dependency -r rails and package them into a single file? One way way would be to use rvm and work with a fresh gemset, that gemset would only contain the gems installed during this process. With bundler you can also do bundle package which will copy all of the apps gems into vendor/cache although apparently this doesn't handle dependencies from git repositories. Your Gemfile.lock also includes a list of all your dependencies. Fred Thanks for taking the time to answer. Much appreciated. (rubygems stashes a copy of the .gem files somewhere if my memory is correct). You could also run gem server on this hypothetical machine with the gems installed - this spawns a server capable of serving gems, you'd just need to tell your ruby install to use it with the gem sources command Fred On Apr 19, 1:58 pm, rubynewbie mohamed.shaf...@gmail.com wrote: Thanks Bryan. I tried this as well as Using a Fiddler as a proxy. But I found that the downloads are being blocked based on the content by the firewall. Generally arbitrary Software Downloads are not permitted in my company. Theres a separate department which manages Software Downloads based on requests they get for it and they provide us with the installables. I have to approach them. But just worried how am I going to explain the Rails packaging / installation procedure to them in order for them to give me a Zip file that has all Rails and its dependent gems. I think I may have to give up. Wouldn't it be great if Rails has all the gems bundled into a single archived file available for download? Thats how most Softwares like Netbeans, Eclipse,Glassfish, JBOSS, Apache, MySQL, Postgre SQL , etc are all delivered. This need not be at the cost doing away with RubyGems installer and the benefits that come with it. Its just about having the archived Rails and its dependencies available for download in the Rails site. Is there a way I can take this as a request to the guys in charge of Rails? Thanks, S On Apr 19, 12:51 am, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:54 AM, rubynewbie mohamed.shaf...@gmail.comwrote: The problem is not inclusion of http:// in the URL(I tried without that). On the contrary I suspect the reason to be on how to specify the domain in the URL. Is my way of specifying the domain right? C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://MYDOMAIN\myUserID:MyPassword@MyProxy:Port I found this on StackOverflow where there were discussing setting the http-proxy environment variable for ISA to install a gem on Windows from behind a proxy. I don't think you need the domain if your admin has specified a default one to authenticate against. However if they have not, one of the comments suggested URI encoding the backslash. So you new string would look like this: http://MYDOMAINhttp://mydomain/%5myUserID:MyPassword@MyProxy:Port http://stackoverflow.com/questions/4418/how-do-i-update-ruby-gems-fro... B. Thanks, S On Apr 18, 6:42 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 4:58 AM, rubynewbie mohamed.shaf...@gmail.com wrote: I am new to Rails and have been facing difficulty while installing rails. I have already installed Ruby and RubyGems on my machine by downloading the packages. But when I install Rails through RubyGems through a HTTP Proxy , I am thrown an error. Below is the details of the command and the exception i am getting : Command Executed : C:\Documents and Settings\Users\Desktopgem install rails -v 3.0.1 -p http://mydomain\myUserID:MyPassword@MyProxy:Port Error thrown : ERROR: While executing gem ... (OptionParser::InvalidArgument) invalid argument: -phttp://myDomain\MyUserID:MyPassword@MyProxy:80 Please note that mydomain is the domain to which my User ID belongs. The
[Rails] Re: Couldn't find Comment without an ID
Frederick Cheung wrote in post #993985: On Apr 20, 11:44am, Neil Bye li...@ruby-forum.com wrote: %= form.text_field :body % % end % But sill get the No route matches {:controller=subcomments} Sorry, that was wrong - it should be form_for [@comment, Subcomment.new], you don't need the :url option You should also make sure that @comment is set to the comment to which subcomments should be added to Fred Back to Started POST /subcomments for 127.0.0.1 at 2011-04-20 12:36:11 +0100 Processing by SubcommentsController#create as JS Parameters: {utf8=✓, authenticity_token=mqjMuo0L9PDPZpLdoB5z2AO93wdub+J4A+hXycWxg6U=, subcomment={body=will this work}, commit=Create Subcomment} User Load (0.9ms) SELECT users.* FROM users WHERE users.id = 6 LIMIT 1 Completed in 142ms ActiveRecord::RecordNotFound (Couldn't find Comment without an ID): My subcomments_controller.rb has: def create @comment = Comment.find(params[:id]) @comment.subcomments.create( :comment_id = @comment.id , :body = params[:subcomment][:body]) render :update do |page| page.reload end end _comment.html.erb has % @user.comments.each do |comment| % div id=remarkp%= comment.body %/p div id=commenterp%= comment.story_id % %= form_for [@comment, Subcomment.new] do |form| % %= form.text_field :body % p%= form.submit %/p % end % /div /div % end % How do I 'make sure that @comment is set to the comment to which subcomments should be added to' ? Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Unable to find out proper document to integrating Salesforce with Rails
On Tue, Apr 19, 2011 at 12:41 AM, sreehari sreehari0...@gmail.com wrote: Hi, I want to use salesforce with my rails3 project. I tried http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_Toolkit_for_Ruby documentation. But i am getting so many errors. It is urgent for me Please reply me if any body knows about this. Thanks in advance... Sorry, there is no Rails 3 for SalesForce yet. It even says so in the link you provided. This article assumes Rails 2.3 development as it was the most current during the toolkit’s development. Rails 3 offers new data functionality and integration into REST APIs and will be covered in a future article. You have two options: 1.) Use Rails 2.3.* and wait for an official Rails 3 toolkit to be launched by SalesForce. 2.) Fix the errors you are getting yourself to make the Rails 2.3.* SalesForce toolkit work on Rails 3. Good luck. B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Rails 3 Crashing On Windows 7
On Tue, Apr 19, 2011 at 2:14 AM, cipher_neo l33...@gmail.com wrote: No, there is only the .js.erb file mentioned above. My public javascripts directory doesn't contain that file. The thing is that it doesn't always crash, it seems to be very random. I am so lost as to the cause, but I really need to find a workaround as it is very annoying trying to get any work done and having to restart the server all the time. Can you post the full error that is placed into the development.log at the time of the crash? Also post the error that is being logged to Event Viewer when it crashes. Thanks, B. thanks On Apr 18, 7:11 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:28 AM, cipher_neo l33...@gmail.com wrote: It seems to die while processing dynamic javascript... I have a controller for managing the dynamic javascript (as documented here:http://railscasts.com/episodes/88-dynamic-select-menus) The exact lines that appear in the development.log file before the app crashes are: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS and the products.js.erb file contains: Is there another javascript file in your javascripts directory called products.js? The log is looking for that file but the examples you sent and the railscast are looking for products.js.erb. B. var products = new Array(); % Product.all.each do |p|% products[%= p.id %] = {'id':'%= p.id %', 'name':'%= p.name %', 'price':%= p.price %}; % end % thanks On Apr 18, 1:49 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Sun, Apr 17, 2011 at 4:14 PM, cipher_neo l33...@gmail.com wrote: sorry, they are all the gems on my system. I only use the following: (from Gemfile) gem 'annotate-models', :require = 'annotate_models' gem 'ruby-debug19' gem 'populator' gem 'faker' gem mongrel, '1.2.0.pre2' What exactly is your application trying to do when it crashes? B. On Apr 16, 4:20 pm, cipher_neo l33...@gmail.com wrote: sure: C:\Windows\System32gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.5) actionpack (3.0.5) activemodel (3.0.5) activerecord (3.0.5) activeresource (3.0.5) activesupport (3.0.5, 2.3.11) annotate-models (1.0.4) archive-tar-minitar (0.5.2) arel (2.0.9) builder (2.1.2) bundler (1.0.10) cgi_multipart_eof_fix (2.5.0) columnize (0.3.2) configuration (1.2.0) diff-lcs (1.1.2) erubis (2.6.6) extlib (0.9.15) faker (0.9.5) gem_plugin (0.2.3) heroku (1.19.1) highline (1.6.1) i18n (0.5.0) launchy (0.3.7) linecache19 (0.5.11) mail (2.2.15) mime-types (1.16) minitest (1.6.0) mongrel (1.2.0.pre2 x86-mingw32) mysql2 (0.2.6 x86-mingw32) polyglot (0.3.1) populator (1.0.0) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.5) railties (3.0.5) rake (0.8.7) rdiscount (1.6.8) rdoc (2.5.8) rest-client (1.6.1) rhodes (2.3.2) ruby-debug-base19 (0.11.24) ruby-debug-ide19 (0.4.12) ruby-debug19 (0.11.6) ruby_core_source (0.1.4) templater (1.0.0) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.25) thanks for the reply On Apr 16, 4:18 pm, Luis Lavena luislav...@gmail.com wrote: On Apr 16, 11:58 am, cipher_neo l33...@gmail.com wrote: Hi guys, I have Rails 3 running on Windows 7 with Ruby 1.9.2 Every now and again, my server crashes, and I see the following information in the windows event log: Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time stamp: 0x4d5ee5ec Exception code: 0xc005 Fault offset: 0x0011a00e Faulting process id: 0x1624 Faulting application start time: 0x01cbfc46036ca1be Faulting application path: C:\Ruby192\bin\ruby.exe Faulting module path: C:\Ruby192\bin\msvcrt-ruby191.dll Report Id: ae8872dc-6839-11e0-ae3f-904ce5fafcb7 I have no clue what is causing this error, but it is a pain to try to get work done when my app keeps crashing. Can you provide a list of the gems involved in your application? That way we would be able to assist you better. -- Luis Lavena -- 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
Re: [Rails] Ruby-protobuff uses which version of GDP
On Tue, Apr 19, 2011 at 5:20 AM, Renuka Patil renuka.pati...@gmail.comwrote: How to know which GDP version is used by ruby-protobuff? Does it support latest version of GDP? According to ruby-protobuf READ.txt everything you need is already included so I don't understand your question. Please be more clear. https://github.com/macks/ruby-protobuf B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: How to change the url (from localhostL:3000) to (example.com)
On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 19, 4:09 am, Alexander cutal...@gmail.com wrote: Open your /etc/hosts file in Linux. Windows is the same hosts file under some other directory. Any how puts the next line in the file 127.0.0.1 example.com Then if you ping example.com IP 127.0.0.1 will respond. now you can use example.com:3000 to access your web site. Thanks .It helped me. If you are not happy with your 3000 port then change Rails default http port setting. I don't know how to change this port number. It's possible with iptables. Try out these rules: sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.0/8 -j REDIRECT --to-port 3000 sudo iptables -t nat -A OUTPUT -p tcp --dport 8080 -d 127.0.0.0/8 -j REDIRECT --to-port 80 First rule will redirect all local traffic from 80 to 3000. The second will redirect 8080 to 80, to allow you access phpmyadmin or whatever you have on 80 port. Tested on Ubuntu. Both exectued sussfully.Now can i access,rails application without port number 3000? If yes,what to do next? Here you go. Amazing what you find on the Internet these days. http://tinyurl.com/3bp7nsh B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Unable to find out proper document to integrating Salesforce with Rails
Thank you so much for your reply. Now I'll try with rails2.3.8 On Apr 20, 5:36 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 12:41 AM, sreehari sreehari0...@gmail.com wrote: Hi, I want to use salesforce with my rails3 project. I tried http://wiki.developerforce.com/index.php/Getting_Started_with_the_For... documentation. But i am getting so many errors. It is urgent for me Please reply me if any body knows about this. Thanks in advance... Sorry, there is no Rails 3 for SalesForce yet. It even says so in the link you provided. This article assumes Rails 2.3 development as it was the most current during the toolkit’s development. Rails 3 offers new data functionality and integration into REST APIs and will be covered in a future article. You have two options: 1.) Use Rails 2.3.* and wait for an official Rails 3 toolkit to be launched by SalesForce. 2.) Fix the errors you are getting yourself to make the Rails 2.3.* SalesForce toolkit work on Rails 3. Good luck. B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rails 3 Crashing On Windows 7
The development log file simply stops tailing... the last output lines are always something like: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS with no output after it. In the windows event viewer at the exact time of the crash is the following information: Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time stamp: 0x4d5ee5ec Exception code: 0xc005 Fault offset: 0x0011a00e Faulting process id: 0x15e0 Faulting application start time: 0x01cbff46fbcfd114 Faulting application path: C:\Ruby192\bin\ruby.exe Faulting module path: C:\Ruby192\bin\msvcrt-ruby191.dll Report Id: 9c20f6fb-6b4e-11e0-b27b-904ce5fafcb7 thanks On Apr 20, 1:39 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 2:14 AM, cipher_neo l33...@gmail.com wrote: No, there is only the .js.erb file mentioned above. My public javascripts directory doesn't contain that file. The thing is that it doesn't always crash, it seems to be very random. I am so lost as to the cause, but I really need to find a workaround as it is very annoying trying to get any work done and having to restart the server all the time. Can you post the full error that is placed into the development.log at the time of the crash? Also post the error that is being logged to Event Viewer when it crashes. Thanks, B. thanks On Apr 18, 7:11 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:28 AM, cipher_neo l33...@gmail.com wrote: It seems to die while processing dynamic javascript... I have a controller for managing the dynamic javascript (as documented here:http://railscasts.com/episodes/88-dynamic-select-menus) The exact lines that appear in the development.log file before the app crashes are: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS and the products.js.erb file contains: Is there another javascript file in your javascripts directory called products.js? The log is looking for that file but the examples you sent and the railscast are looking for products.js.erb. B. var products = new Array(); % Product.all.each do |p|% products[%= p.id %] = {'id':'%= p.id %', 'name':'%= p.name %', 'price':%= p.price %}; % end % thanks On Apr 18, 1:49 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Sun, Apr 17, 2011 at 4:14 PM, cipher_neo l33...@gmail.com wrote: sorry, they are all the gems on my system. I only use the following: (from Gemfile) gem 'annotate-models', :require = 'annotate_models' gem 'ruby-debug19' gem 'populator' gem 'faker' gem mongrel, '1.2.0.pre2' What exactly is your application trying to do when it crashes? B. On Apr 16, 4:20 pm, cipher_neo l33...@gmail.com wrote: sure: C:\Windows\System32gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.5) actionpack (3.0.5) activemodel (3.0.5) activerecord (3.0.5) activeresource (3.0.5) activesupport (3.0.5, 2.3.11) annotate-models (1.0.4) archive-tar-minitar (0.5.2) arel (2.0.9) builder (2.1.2) bundler (1.0.10) cgi_multipart_eof_fix (2.5.0) columnize (0.3.2) configuration (1.2.0) diff-lcs (1.1.2) erubis (2.6.6) extlib (0.9.15) faker (0.9.5) gem_plugin (0.2.3) heroku (1.19.1) highline (1.6.1) i18n (0.5.0) launchy (0.3.7) linecache19 (0.5.11) mail (2.2.15) mime-types (1.16) minitest (1.6.0) mongrel (1.2.0.pre2 x86-mingw32) mysql2 (0.2.6 x86-mingw32) polyglot (0.3.1) populator (1.0.0) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.5) railties (3.0.5) rake (0.8.7) rdiscount (1.6.8) rdoc (2.5.8) rest-client (1.6.1) rhodes (2.3.2) ruby-debug-base19 (0.11.24) ruby-debug-ide19 (0.4.12) ruby-debug19 (0.11.6) ruby_core_source (0.1.4) templater (1.0.0) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.25) thanks for the reply On Apr 16, 4:18 pm, Luis Lavena luislav...@gmail.com wrote: On Apr 16, 11:58 am, cipher_neo l33...@gmail.com wrote: Hi guys, I have Rails 3 running on Windows 7 with Ruby 1.9.2 Every now and again, my server crashes, and I see the following information in the windows event log: Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed Faulting module name: msvcrt-ruby191.dll, version:
[Rails] Re: Rails 3 Crashing On Windows 7
another thing... it seems to happen a lot when accessing the application with multiple simultaneous clients this may not be the cause, but might be a hint On Apr 20, 2:11 pm, cipher_neo l33...@gmail.com wrote: The development log file simply stops tailing... the last output lines are always something like: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS with no output after it. In the windows event viewer at the exact time of the crash is the following information: Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time stamp: 0x4d5ee5ec Exception code: 0xc005 Fault offset: 0x0011a00e Faulting process id: 0x15e0 Faulting application start time: 0x01cbff46fbcfd114 Faulting application path: C:\Ruby192\bin\ruby.exe Faulting module path: C:\Ruby192\bin\msvcrt-ruby191.dll Report Id: 9c20f6fb-6b4e-11e0-b27b-904ce5fafcb7 thanks On Apr 20, 1:39 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 2:14 AM, cipher_neo l33...@gmail.com wrote: No, there is only the .js.erb file mentioned above. My public javascripts directory doesn't contain that file. The thing is that it doesn't always crash, it seems to be very random. I am so lost as to the cause, but I really need to find a workaround as it is very annoying trying to get any work done and having to restart the server all the time. Can you post the full error that is placed into the development.log at the time of the crash? Also post the error that is being logged to Event Viewer when it crashes. Thanks, B. thanks On Apr 18, 7:11 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:28 AM, cipher_neo l33...@gmail.com wrote: It seems to die while processing dynamic javascript... I have a controller for managing the dynamic javascript (as documented here:http://railscasts.com/episodes/88-dynamic-select-menus) The exact lines that appear in the development.log file before the app crashes are: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS and the products.js.erb file contains: Is there another javascript file in your javascripts directory called products.js? The log is looking for that file but the examples you sent and the railscast are looking for products.js.erb. B. var products = new Array(); % Product.all.each do |p|% products[%= p.id %] = {'id':'%= p.id %', 'name':'%= p.name %', 'price':%= p.price %}; % end % thanks On Apr 18, 1:49 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Sun, Apr 17, 2011 at 4:14 PM, cipher_neo l33...@gmail.com wrote: sorry, they are all the gems on my system. I only use the following: (from Gemfile) gem 'annotate-models', :require = 'annotate_models' gem 'ruby-debug19' gem 'populator' gem 'faker' gem mongrel, '1.2.0.pre2' What exactly is your application trying to do when it crashes? B. On Apr 16, 4:20 pm, cipher_neo l33...@gmail.com wrote: sure: C:\Windows\System32gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.5) actionpack (3.0.5) activemodel (3.0.5) activerecord (3.0.5) activeresource (3.0.5) activesupport (3.0.5, 2.3.11) annotate-models (1.0.4) archive-tar-minitar (0.5.2) arel (2.0.9) builder (2.1.2) bundler (1.0.10) cgi_multipart_eof_fix (2.5.0) columnize (0.3.2) configuration (1.2.0) diff-lcs (1.1.2) erubis (2.6.6) extlib (0.9.15) faker (0.9.5) gem_plugin (0.2.3) heroku (1.19.1) highline (1.6.1) i18n (0.5.0) launchy (0.3.7) linecache19 (0.5.11) mail (2.2.15) mime-types (1.16) minitest (1.6.0) mongrel (1.2.0.pre2 x86-mingw32) mysql2 (0.2.6 x86-mingw32) polyglot (0.3.1) populator (1.0.0) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.5) railties (3.0.5) rake (0.8.7) rdiscount (1.6.8) rdoc (2.5.8) rest-client (1.6.1) rhodes (2.3.2) ruby-debug-base19 (0.11.24) ruby-debug-ide19 (0.4.12) ruby-debug19 (0.11.6) ruby_core_source (0.1.4) templater (1.0.0) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.25) thanks for the reply On Apr 16, 4:18 pm, Luis Lavena luislav...@gmail.com wrote: On Apr 16, 11:58 am, cipher_neo l33...@gmail.com wrote: Hi guys, I
Re: [Rails] Re: how to handle session with external input?
On Tue, Apr 19, 2011 at 4:19 PM, frankblizzard tmaxim...@googlemail.comwrote: Thanks Bryan, sure this wouldn't be a problem. But isn't a session connected to the browser in some way. I think I dont understand the whole session, authenticity, forgery topic in rails yet. It uses cookies to store the session information. You would need to pass that cookie info back on requests. You can learn more about it here: http://guides.rubyonrails.org/security.html You think I can login the user once from the Air app and after the server will accept post requests, or do I need to pass back the session data from the server (session_id, token) and send it then with each request back from the Air app? You may want to look into the plugin WebORB. It allows for flex applications to connect to Rails and us your classes like web services. http://www.themidnightcoders.com/products/weborb-for-rails/overview.html You also definitely want to check out the site flexonrails.com. They have a series of Air apps that they connected to Rails for a demo at RailsCon2008 and all the source is on their site. http://flexonrails.com/ B. Thomas On 18 Apr., 15:34, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 4:48 AM, frankblizzard tmaxim...@googlemail.com wrote: Hi, I hope I chose the right title for the question. I am doing a time tracking app for our intranet. Because the people tend to forget to save their hours, we made a small desktop app with adobe air that pops up where you can enter your hours, the hours should be posted to the hours controller of the rails app. When we post the data to /hours/new we get redirected to the login page, because we are not logged in. Question is can a session exist outside of the application, or does session return anything that we could send with each post data to confirm that the user is logged in? which route you guys would go in order to solve this problem? many thanks in advance.. I would suggest coding your Adobe Air application to login into your rails app before trying to add the hours. If you have the users login/password, whether provided by the user or stored by them in your Air app, then it should not be too much of an issue to send them over to your login controller and log the user in. B. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Couldn't find Comment without an ID
On Apr 20, 12:46 pm, Neil Bye li...@ruby-forum.com wrote: def create @comment = Comment.find(params[:id]) @comment.subcomments.create( :comment_id = @comment.id , :body = params[:subcomment][:body]) render :update do |page| page.reload end end _comment.html.erb has % @user.comments.each do |comment| % div id=remarkp%= comment.body %/p div id=commenterp%= comment.story_id % %= form_for [@comment, Subcomment.new] do |form| % %= form.text_field :body % p%= form.submit %/p Ah, so since comment is clearly the comment for which you want create subcomments, that should be form_for [comment, Subcomment.new] - I had got the impression that this was on a single 'show' page for a particular comment (where @comment would usually be the comment being shown) Fred % end % /div /div % end % How do I 'make sure that @comment is set to the comment to which subcomments should be added to' ? Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Cannot get progress bars to work w/ Apache Progress Module
I am following this screencast http://railsillustrated.com/screencast-file-uploads-progress-in-rails-passenger.html as well as comparing this against all the other rails Apache Progress Module progress bar examples and I can't figure out why I am always getting a 404 routing error: ActionController::RoutingError (No route matches /progress): I have a feeling that it's something centered around my apache configurations but everything seems to check out. in my httpd.conf I have these relative configs: LoadModule upload_progress_module libexec/apache2/mod_upload_progress.so Include /private/etc/apache2/other/*.conf Include /private/etc/apache2/passenger_pane_vhosts/*.conf in my passenger_pane_vhosts/file_upload_progress1.local.vhost.conf I have this virtual host set up: [code] VirtualHost *:80 ServerName file_upload_progress1.local DocumentRoot /Library/WebServer/Documents/ROR_tests/file_upload_progress1/public RailsEnv development #RailsAllowModRewrite off directory /Library/WebServer/Documents/ROR_tests/file_upload_progress1/public Order allow,deny Allow from all # AllowOverride all /directory # needed for tracking upload progess Location / # enable tracking uploads in / TrackUploads On /Location Location /progress # enable upload progress reports in /progress ReportUploads On /Location /VirtualHost [/code] in /private/etc/apache2/extra/httpd-vhosts.conf I have: NameVirtualHost *:80 Another off the hand problem I'm having, and might be a clue is w/ my Passenger Pane. I installed the Phusion Passenger Pane and every time I try to add an entry, I get this error: Your changes couldn’t be saved See the Console log for details. Please help! I've spent days trying to figure this out and it's driving me crazy. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Couldn't find Comment without an ID
Frederick Cheung wrote in post #994021: On Apr 20, 12:46pm, Neil Bye li...@ruby-forum.com wrote: _comment.html.erb has , that should be form_for [comment, Subcomment.new] - I had I got there on that but it still says Couldn't find Comment without an ID Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: rails new project
interestingly, i tried too many asynchron little things like updating removing gems etc. But when i do, `gem update --system` it is working now, my rails new command really creates a new project. On Apr 20, 11:05 am, davit mehmetda...@gmail.com wrote: Hi, I have a weird problem that i could not understand. When i write `rails new project` on the terminal it puts me help of rails command. * i use mac osx * ruby works well * gem works well * i uninstalled rails gem and installed again As you see: Mehmet-Davuts-MacBook-Pro:Desktop davit$ rails new project Usage: rails new APP_PATH [options] Options: -J, [--skip-prototype] # Skip Prototype files -T, [--skip-test-unit] # Skip Test::Unit files -G, [--skip-git] # Skip Git ignores and keeps -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) [--dev] # Setup the application with Gemfile pointing to your Rails checkout -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) [--edge] # Setup the application with Gemfile pointing to Rails repository [--skip-gemfile] # Don't create a Gemfile -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/bin/ruby -O, [--skip-active-record] # Skip Active Record files Runtime options: -q, [--quiet] # Supress status output -s, [--skip] # Skip files that already exist -f, [--force] # Overwrite files that already exist -p, [--pretend] # Run but do not make any changes Rails options: -v, [--version] # Show Rails version number and quit -h, [--help] # Show this help message and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/ weblog. See the README in the newly created application to get going. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Rails 3 Crashing On Windows 7
On Wed, Apr 20, 2011 at 8:14 AM, cipher_neo l33...@gmail.com wrote: another thing... it seems to happen a lot when accessing the application with multiple simultaneous clients this may not be the cause, but might be a hint When you installed Ruby on Windows did you use RubyInstaller to do it? If so did you also install the DevKit? B. On Apr 20, 2:11 pm, cipher_neo l33...@gmail.com wrote: The development log file simply stops tailing... the last output lines are always something like: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS with no output after it. In the windows event viewer at the exact time of the crash is the following information: Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time stamp: 0x4d5ee5ec Exception code: 0xc005 Fault offset: 0x0011a00e Faulting process id: 0x15e0 Faulting application start time: 0x01cbff46fbcfd114 Faulting application path: C:\Ruby192\bin\ruby.exe Faulting module path: C:\Ruby192\bin\msvcrt-ruby191.dll Report Id: 9c20f6fb-6b4e-11e0-b27b-904ce5fafcb7 thanks On Apr 20, 1:39 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 2:14 AM, cipher_neo l33...@gmail.com wrote: No, there is only the .js.erb file mentioned above. My public javascripts directory doesn't contain that file. The thing is that it doesn't always crash, it seems to be very random. I am so lost as to the cause, but I really need to find a workaround as it is very annoying trying to get any work done and having to restart the server all the time. Can you post the full error that is placed into the development.log at the time of the crash? Also post the error that is being logged to Event Viewer when it crashes. Thanks, B. thanks On Apr 18, 7:11 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:28 AM, cipher_neo l33...@gmail.com wrote: It seems to die while processing dynamic javascript... I have a controller for managing the dynamic javascript (as documented here:http://railscasts.com/episodes/88-dynamic-select-menus) The exact lines that appear in the development.log file before the app crashes are: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS and the products.js.erb file contains: Is there another javascript file in your javascripts directory called products.js? The log is looking for that file but the examples you sent and the railscast are looking for products.js.erb. B. var products = new Array(); % Product.all.each do |p|% products[%= p.id %] = {'id':'%= p.id %', 'name':'%= p.name%', 'price':%= p.price %}; % end % thanks On Apr 18, 1:49 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Sun, Apr 17, 2011 at 4:14 PM, cipher_neo l33...@gmail.com wrote: sorry, they are all the gems on my system. I only use the following: (from Gemfile) gem 'annotate-models', :require = 'annotate_models' gem 'ruby-debug19' gem 'populator' gem 'faker' gem mongrel, '1.2.0.pre2' What exactly is your application trying to do when it crashes? B. On Apr 16, 4:20 pm, cipher_neo l33...@gmail.com wrote: sure: C:\Windows\System32gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.5) actionpack (3.0.5) activemodel (3.0.5) activerecord (3.0.5) activeresource (3.0.5) activesupport (3.0.5, 2.3.11) annotate-models (1.0.4) archive-tar-minitar (0.5.2) arel (2.0.9) builder (2.1.2) bundler (1.0.10) cgi_multipart_eof_fix (2.5.0) columnize (0.3.2) configuration (1.2.0) diff-lcs (1.1.2) erubis (2.6.6) extlib (0.9.15) faker (0.9.5) gem_plugin (0.2.3) heroku (1.19.1) highline (1.6.1) i18n (0.5.0) launchy (0.3.7) linecache19 (0.5.11) mail (2.2.15) mime-types (1.16) minitest (1.6.0) mongrel (1.2.0.pre2 x86-mingw32) mysql2 (0.2.6 x86-mingw32) polyglot (0.3.1) populator (1.0.0) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.5) railties (3.0.5) rake (0.8.7) rdiscount (1.6.8) rdoc (2.5.8) rest-client (1.6.1) rhodes (2.3.2) ruby-debug-base19 (0.11.24) ruby-debug-ide19 (0.4.12)
Re: [Rails] Check that my sqlite database populated
On Tue, Apr 19, 2011 at 4:27 PM, Federico federico.rot...@gmail.com wrote: Hello guys, I've made a very simple application following the footsteps of http://guides.rubyonrails.org/getting_started.html. I managed to insert my objects (i checked the existence of inserted objects through the rails console with a simple Foo.all ) but if I run sqlite3 from command line and then run .databases I can't see any database created. I thought I could see the databases set in my database.yml ( database: db/development.sqlite3 database: db/test.sqlite3 database: db/ production.sqlite3 ) but the .databases command shows nothing. sqlite3 --version 3.5.6 rails -v 3.0.5 O.S. Windows 7 You don't see any of the databases you expected to see. What do you see when you run .databases? B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Couldn't find Comment without an ID
On Apr 20, 2:49 pm, Neil Bye li...@ruby-forum.com wrote: Frederick Cheung wrote in post #994021: On Apr 20, 12:46pm, Neil Bye li...@ruby-forum.com wrote: _comment.html.erb has , that should be form_for [comment, Subcomment.new] - I had I got there on that but it still says Couldn't find Comment without an ID Check the parameters you get in your controller - you'll probably need to use params[:comment_id] rather than params[:id] Fred Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Cannot get progress bars to work w/ Apache Progress Module
On Apr 20, 2:48 pm, Clem Rock li...@ruby-forum.com wrote: Location / # enable tracking uploads in / TrackUploads On /Location Location /progress # enable upload progress reports in /progress ReportUploads On /Location You need to tell passenger not to pass /progress to your rails app - eg by sticking PassengerEnabled off in that location block Fred /VirtualHost [/code] in /private/etc/apache2/extra/httpd-vhosts.conf I have: NameVirtualHost *:80 Another off the hand problem I'm having, and might be a clue is w/ my Passenger Pane. I installed the Phusion Passenger Pane and every time I try to add an entry, I get this error: Your changes couldn’t be saved See the Console log for details. Please help! I've spent days trying to figure this out and it's driving me crazy. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rails 3 Crashing On Windows 7
yes, I used the RubyInstaller to install: ruby 1.9.2p180 (2011-02-18) [i386-mingw32] and I also installed devkit and configured it to embed itself into the above install. On Apr 20, 3:05 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Wed, Apr 20, 2011 at 8:14 AM, cipher_neo l33...@gmail.com wrote: another thing... it seems to happen a lot when accessing the application with multiple simultaneous clients this may not be the cause, but might be a hint When you installed Ruby on Windows did you use RubyInstaller to do it? If so did you also install the DevKit? B. On Apr 20, 2:11 pm, cipher_neo l33...@gmail.com wrote: The development log file simply stops tailing... the last output lines are always something like: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS with no output after it. In the windows event viewer at the exact time of the crash is the following information: Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time stamp: 0x4d5ee5ec Exception code: 0xc005 Fault offset: 0x0011a00e Faulting process id: 0x15e0 Faulting application start time: 0x01cbff46fbcfd114 Faulting application path: C:\Ruby192\bin\ruby.exe Faulting module path: C:\Ruby192\bin\msvcrt-ruby191.dll Report Id: 9c20f6fb-6b4e-11e0-b27b-904ce5fafcb7 thanks On Apr 20, 1:39 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 2:14 AM, cipher_neo l33...@gmail.com wrote: No, there is only the .js.erb file mentioned above. My public javascripts directory doesn't contain that file. The thing is that it doesn't always crash, it seems to be very random. I am so lost as to the cause, but I really need to find a workaround as it is very annoying trying to get any work done and having to restart the server all the time. Can you post the full error that is placed into the development.log at the time of the crash? Also post the error that is being logged to Event Viewer when it crashes. Thanks, B. thanks On Apr 18, 7:11 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 9:28 AM, cipher_neo l33...@gmail.com wrote: It seems to die while processing dynamic javascript... I have a controller for managing the dynamic javascript (as documented here:http://railscasts.com/episodes/88-dynamic-select-menus) The exact lines that appear in the development.log file before the app crashes are: Started GET /javascripts/products.js for 89.100.131.129 at 2011-04-18 15:23:49 +0100 Processing by JavascriptsController#products as JS and the products.js.erb file contains: Is there another javascript file in your javascripts directory called products.js? The log is looking for that file but the examples you sent and the railscast are looking for products.js.erb. B. var products = new Array(); % Product.all.each do |p|% products[%= p.id %] = {'id':'%= p.id %', 'name':'%= p.name%', 'price':%= p.price %}; % end % thanks On Apr 18, 1:49 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Sun, Apr 17, 2011 at 4:14 PM, cipher_neo l33...@gmail.com wrote: sorry, they are all the gems on my system. I only use the following: (from Gemfile) gem 'annotate-models', :require = 'annotate_models' gem 'ruby-debug19' gem 'populator' gem 'faker' gem mongrel, '1.2.0.pre2' What exactly is your application trying to do when it crashes? B. On Apr 16, 4:20 pm, cipher_neo l33...@gmail.com wrote: sure: C:\Windows\System32gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.5) actionpack (3.0.5) activemodel (3.0.5) activerecord (3.0.5) activeresource (3.0.5) activesupport (3.0.5, 2.3.11) annotate-models (1.0.4) archive-tar-minitar (0.5.2) arel (2.0.9) builder (2.1.2) bundler (1.0.10) cgi_multipart_eof_fix (2.5.0) columnize (0.3.2) configuration (1.2.0) diff-lcs (1.1.2) erubis (2.6.6) extlib (0.9.15) faker (0.9.5) gem_plugin (0.2.3) heroku (1.19.1) highline (1.6.1) i18n (0.5.0) launchy (0.3.7) linecache19 (0.5.11) mail (2.2.15) mime-types (1.16) minitest (1.6.0) mongrel (1.2.0.pre2 x86-mingw32) mysql2 (0.2.6 x86-mingw32) polyglot (0.3.1) populator (1.0.0)
[Rails] Re: Couldn't find Comment without an ID
On Apr 20, 3:33 pm, Neil Bye li...@ruby-forum.com wrote: Frederick Cheung wrote in post #994032: Check the parameters you get in your controller - you'll probably need to use params[:comment_id] rather than params[:id] Fred Tried params[:comment_id] It goes to /comments/1/subcomments and says: try { window.location.reload();} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('window.location.reload();'); throw e } Does this mean its gone through and found another error. ? That means that it rendered your rjs (which is telling the page to reload) but the form wasn't setup to to receive a rjs response. Your subcomment should have been created though. Fred Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] rake db:create fails
On Tue, Apr 19, 2011 at 10:24 PM, Darlan Machado li...@ruby-forum.comwrote: Hello folks, I´m here trying to find the way to solve my problem. When i try to run rake db:create or rake db:create:all the process stops and the databases are not created. I change the directives, putting --trace before the rake db:create and the steps are C:\appws\cookbookrake db:create --trace (in C:/appws/cookbook) ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:create and, then, nothing happens. What adapter are you using in your databse.yml file? B. I´m using Windows 7 32 bits, MySql 5.5.9 (libmysql.dll 5.5.9), Rails 3.0.6, Ruby 1.9.2p180, GEM 1.7.2 and the gem list is *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.6) actionpack (3.0.6) activemodel (3.0.6) activerecord (3.0.6) activeresource (3.0.6) activesupport (3.0.6) arel (2.0.9) builder (2.1.2) bundler (1.0.12) cgi_multipart_eof_fix (2.5.0) erubis (2.6.6) fastthread (1.0.1 i386-mswin32) gem_plugin (0.2.3) i18n (0.5.0) linecache (0.43 mswin32) mail (2.2.16) mime-types (1.16) minitest (1.6.0) mongrel (1.1.5 x86-mingw32) mysql (2.8.1 x86-mingw32, 2.7.3 mswin32) mysql2 (0.2.7) polyglot (0.3.1) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.6) railties (3.0.6) rake (0.8.7) rdiscount (1.6.8) rdoc (2.5.8) ruby-debug-base (0.10.3 mswin32) ruby-debug-ide (0.4.5) ruby-oci8 (2.0.4 x86-mingw32) rubygems-update (1.7.2) sqlite3-ruby (1.2.1 mswin32) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.26) Can anyone help me, please? thank´s a lot -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Couldn't find Comment without an ID
On Tue, Apr 19, 2011 at 1:52 PM, Neil Bye li...@ruby-forum.com wrote: Im trying to makee an application that allows subcomments ie comments on comments. The point where I get stuck is finding the comment that is commented on. This is an excerpt from subcomment.rb def create @comment = Comment.find(params[:id]) @comment.subcomments.create( :comment_id = @comment.id , :body = params[:subcomment][:body]) render :update do |page| page.reload end end Is there any reason you're using create instead of build? This is how I would code it. @comment.subcomments.build(params[:subcomment]) Note: I haven't tested it, etc. etc. Trevor Oke The second line is obviously wrong (and bviously works if I give a value for :id) so I think I might have the wrong approach. Can anyone shed light on this issue. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Couldn't find Comment without an ID
Neil Bye wrote in post #994040: Frederick Cheung wrote in post #994032: Check the parameters you get in your controller - you'll probably need to use params[:comment_id] rather than params[:id] Fred Tried params[:comment_id] It goes to /comments/1/subcomments and says: try { window.location.reload(); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('window.location.reload();'); throw e } Does this mean its gone through and found another error. ? Neil I was right it did go through. The mystery js must have come from render :update do |page| page.reload end Is that because in the comment creator I used form_for Remote = true ? Anyway if I relpace the above with a simple redirect it works. Thanks for you patient help. Neil -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Connecting to MSSQL with Ruby on Ubuntu
On Wed, Apr 20, 2011 at 1:24 AM, DHAMODHARAN N dhams...@gmail.com wrote: Hello friends, I tried to connect MSSql with Ruby on Ubuntu follow this linkhttp://lambie.org/2008/02/28/connecting-to-an-mssql-database-from-ruby-on-ubuntu/ its working nice. But i tried with Sequel.connect method connection was established but try to fetching data following error was raised irb(main):035:1 DB.synchronize do |conn| irb(main):035:1 end Sequel::DatabaseConnectionError: ODBC::Error: IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified Please give suggestions to resolve this error. Thanks Regards, Dhamodharan N Please post your code of how you are making the connection. Thanks, B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] I need help for Gem installation required root password on ubuntu
On Wed, Apr 20, 2011 at 1:26 AM, hoboy Hoboy li...@ruby-forum.com wrote: I have install netbeans 7 ide, then install ruby plugin but when I try to install any gem using the netbeans plugins I am asked for root password of ubuntu, how can I find my root password, because when I use the login password, that doesn't work. I am using ubuntu10.10 desktop. If you did not install the desktop you will need to ask the person who did what it is. Alternately you can see if you have sudo access and install the gems that way. It will take your login password. sudo gem install gem name B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Unable to install Rails using Gem
On Wed, Apr 20, 2011 at 2:36 AM, rubynewbie mohamed.shaf...@gmail.comwrote: On Apr 16, 1:48 am, Bryan Crossland bacrossl...@gmail.com wrote: On Fri, Apr 15, 2011 at 5:18 AM, Shafeeq mohamed.shaf...@gmail.com wrote: On Apr 14, 4:46 pm, Michael Pavling pavl...@gmail.com wrote: On 14 April 2011 12:30, Shafeeq mohamed.shaf...@gmail.com wrote: The question is quite simple. But the answer to simple questions is frequently much more complicated... Is there a way I can package Rails gem and all its dependencies (in a machine where I have internet connection) into a single file to be FTPed to the server (where I dont have internet) for installation? Yes. You can download all the dependent gems from rubygems.org. Zip them into one file, and ftp them Do i have to locate the gem files manually in order to zip them into a single file? Say i run gem dependency -r rails which returns me a list of say 100 gems. These gems are located in a directory where there are already 1000 gem files which includes these Rails and its dependent files also. Do I have to browse through the file system manually to locate these 100 rails dependent gem files(from the already existing 1000 files) in order to package/zip them into a single file? Wouldn't that be painful? Is there an automated way of packaging the gem files which would take the output from gem dependency -r rails and package them into a single file? Yes you have to locate them. The good news is that 99.9% of the time they are all installed in the same path. This makes your job of finding them easier. Do you have to find them all by hand? No, you're a programmer. Write a script that parses the output and then gets the packages for you placing them all into one nice zip file. Not everything in life is going to come easy and nicely packaged for you. Sometimes you have to work at it. B. Thanks, S Thanks. When you said I can download all the dependent gems and zip them, do i have to download them all manually from rubygems.org using a browser? Or if I choose to download them all through RubyGems installer whats the path where I can find all the downloaded gems in the rails installation location? No you don't have to download through a browser from rubygems.org. You can download them through the gem installer. You can find the location of where a gem is installed on your system by running the following command: gem which name_of_gem If the Gems are present at a location where there are lots of other non-Rails Gems, then wouldn't it be very painful to segregate the Rails Gems? There will be lots of gems installed on your system for different reasons. No it is not painful to segregate them. You can see a list of the gems that Rails has a dependency on by running the following command: gem dependency rails The gem installer is your best tool. Take the time to read the manuals which will give you more than enough information on the above questions you have and more. http://docs.rubygems.org/ I wish there was a simpler way like all the Rails Gems packaged into one bundle available for download. This is in addition to the existing way of installation. This is about having an additional option to a valid situation where you can install do an installation over the internet. The easier way is the gem installer whether you are connected to the internet or you have a copy of the gem package file you transferred onto your server from another machine. The gem installer does not need the internet to install a gem. You just have to have the gem you want to install. Where are all the packages that you need to install Rails? rubygems.org. And now the argument has come full circle. B. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to enable production enviornment in RoR 2.3.5
I want to enable production enviornment for my appication.The content of database.yml file is as # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # 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: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: mysql database: production username: root password: 12345 pool: 5 timeout: 5000 I ran RAILS_ENV=production rake db:create ,it created a production database.Here is assume that the production enviornment is enable(But i was wrong).Then i created a simple scaffold as. script/generate scaffold person firstname:string lastname:string; rake db:migrate(it created a table namedpeople in amritpal database that is used in development envionrment.But in production enviornment ,the database production hasn't any talbe) How to enable it? Thanks -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 20, 8:51 am, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 19, 4:09 am, Alexander cutal...@gmail.com wrote: Open your /etc/hosts file in Linux. Windows is the same hosts file under some other directory. Any how puts the next line in the file 127.0.0.1 example.com Then if you ping example.com IP 127.0.0.1 will respond. now you can use example.com:3000 to access your web site. Thanks .It helped me. If you are not happy with your 3000 port then change Rails default http port setting. I don't know how to change this port number. It's possible with iptables. Try out these rules: sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.0/8 -j REDIRECT --to-port 3000 sudo iptables -t nat -A OUTPUT -p tcp --dport 8080 -d 127.0.0.0/8 -j REDIRECT --to-port 80 First rule will redirect all local traffic from 80 to 3000. The second will redirect 8080 to 80, to allow you access phpmyadmin or whatever you have on 80 port. Tested on Ubuntu. Both exectued sussfully.Now can i access,rails application without port number 3000? If yes,what to do next? Here you go. Amazing what you find on the Internet these days. http://tinyurl.com/3bp7nsh It tells to run the app on different ports,but i want to run it without giving any port like at example.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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] How to enable production enviornment in RoR 2.3.5
On 20 April 2011 17:21, amritpal pathak amritpalpath...@gmail.com wrote: I want to enable production enviornment for my appication.The content of database.yml file is as # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # 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: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: mysql database: production username: root password: 12345 pool: 5 timeout: 5000 I ran RAILS_ENV=production rake db:create ,it created a production database.Here is assume that the production enviornment is enable(But i was wrong).Then i created a simple scaffold as. script/generate scaffold person firstname:string lastname:string; rake db:migrate(it created a table namedpeople in amritpal database that is used in development envionrment.But in production enviornment ,the database production hasn't any talbe) How to enable it? How many times do I have to tell you? RAILS_ENV=production rake db:migrate will run the migrations on the production database. If you do not understand or it does not work please say what you are having difficulty with. 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: How to change the url (from localhostL:3000) to (example.com)
On Wed, Apr 20, 2011 at 11:31 AM, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 20, 8:51 am, Bryan Crossland bacrossl...@gmail.com wrote: On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 19, 4:09 am, Alexander cutal...@gmail.com wrote: Open your /etc/hosts file in Linux. Windows is the same hosts file under some other directory. Any how puts the next line in the file 127.0.0.1 example.com Then if you ping example.com IP 127.0.0.1 will respond. now you can use example.com:3000 to access your web site. Thanks .It helped me. If you are not happy with your 3000 port then change Rails default http port setting. I don't know how to change this port number. It's possible with iptables. Try out these rules: sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.0/8 -j REDIRECT --to-port 3000 sudo iptables -t nat -A OUTPUT -p tcp --dport 8080 -d 127.0.0.0/8 -j REDIRECT --to-port 80 First rule will redirect all local traffic from 80 to 3000. The second will redirect 8080 to 80, to allow you access phpmyadmin or whatever you have on 80 port. Tested on Ubuntu. Both exectued sussfully.Now can i access,rails application without port number 3000? If yes,what to do next? Here you go. Amazing what you find on the Internet these days. http://tinyurl.com/3bp7nsh It tells to run the app on different ports,but i want to run it without giving any port like at example.com Basics of the internet. http requests default to port 80. example.com is responding on port 80. Set you app to run on port 80. B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: rake db:create fails
Have you mention the database name in dabase.yml file? Regards Amrit pal -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Dynamic Select Menu
Hello i have the following issue: I need to use two list in a menu to redirect my users to a different view, This is something like the select of a list in country and state, that when you select the country it will render the states under that selected country, the main difference is that i want to use it in navigation, does any one, may help with this? Thank you! -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] How to enable production enviornment in RoR 2.3.5
On Wed, Apr 20, 2011 at 11:21 AM, amritpal pathak amritpalpath...@gmail.com wrote: I want to enable production enviornment for my appication.The content of database.yml file is as # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # 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: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: mysql database: production username: root password: 12345 pool: 5 timeout: 5000 I ran RAILS_ENV=production rake db:create ,it created a production database.Here is assume that the production enviornment is enable(But i was wrong).Then i created a simple scaffold as. script/generate scaffold person firstname:string lastname:string; rake db:migrate(it created a table namedpeople in amritpal database that is used in development envionrment.But in production enviornment ,the database production hasn't any talbe) How to enable it? Thanks I believe Colin already discussed with with you in another thread. As I have tried to explain several times the value of RAILS_ENV determines which environment will be used when you execute a rake command. The environment defaults to development. So: rake db:migrate will migrate the development db. RAILS_ENV=production rake db:migrate will migrate the production db. Colin If you are looking to be always running in production mode and never in any other mode then my advice would be the set the environment variable RAILS_ENV on your system to production. RAILS_ENV=production You can look up how to do that for your OS anywhere on the internet. B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Full Time Position: Ruby (Rails) Developer (Java Expert a plus) - NYC
JBCHoldings and our family of companies (JBCStyle, JBCConnect and Jonathan Beth Consultants) are seeking a full time Ruby (Rails) Developer (Java Script expert a plus). Location: New york City - Midtown Bryant Park Start: Immediately Salary: Commensurate with Experience We are looking for smart, motivated and savvy rails engineers to help strengthen, scale and evolve our proprietary electronic timesheet and payroll platform. Desirable Skills: * Experience with functional and object orientated development * Critical that you can deploy a rails application * Ruby on Rails, Rails, Back-end development, PHP, Perl, Ruby, Java, HTML, AJAX, UNIX/Linux, MySql and erlang would be a plus! * Knowledge of telephony protocols (SIP, RTP RTMP etc.) A plus * Must be team-oriented, possess a positive attitude and work well withothers. * Must be flexible and able to work accurately in a fast-paced environment. * Ability to work independently and deliver on schedule with little supervision. * Ability to quickly understand and articulate interactions in a complex technical environment. * Able to plan and execute own tasks in timely manner. * Passionate about software development, willing to learn new technology, self-motivated with high technical competency Our office is located in gorgeous midtown NYC across the street from Bryant Park. We offer competitive compensation, provide medical/ dental/vision coverage as well as 401k and Profit Sharing plan. We're a Pc and MAC shop. Send Resume to Bryan at JBCStyle dot 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to enable production enviornment in RoR 2.3.5
On Apr 20, 1:01 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Wed, Apr 20, 2011 at 11:21 AM, amritpal pathak amritpalpath...@gmail.com wrote: I want to enable production enviornment for my appication.The content of database.yml file is as # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # 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: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: mysql database: production username: root password: 12345 pool: 5 timeout: 5000 I ran RAILS_ENV=production rake db:create ,it created a production database.Here is assume that the production enviornment is enable(But i was wrong).Then i created a simple scaffold as. script/generate scaffold person firstname:string lastname:string; rake db:migrate(it created a table namedpeople in amritpal database that is used in development envionrment.But in production enviornment ,the database production hasn't any talbe) How to enable it? Thanks I believe Colin already discussed with with you in another thread. As I have tried to explain several times the value of RAILS_ENV determines which environment will be used when you execute a rake command. The environment defaults to development. So: rake db:migrate will migrate the development db. RAILS_ENV=production rake db:migrate will migrate the production db. Colin If you are looking to be always running in production mode and never in any other mode then my advice would be the set the environment variable RAILS_ENV on your system to production. RAILS_ENV=production You can look up how to do that for your OS anywhere on the internet. At other thread ,i followed collin instrutions but at last i strucked a error to which i didnt receive a reply yet.So i post a new thread.Please look at that thread and see if you can help http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d911b888dbd30c58 Thanks -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Mac Phusion Passenger Pane not working
On 20 Apr 2011, at 15:11, Clem Rock li...@ruby-forum.com wrote: I have a feeling that this is something centered around my apache/Passenger configurations but everything seems to check out. Another off the hand problem I'm having, and might be a clue is w/ my Passenger Pane. I installed the Phusion Passenger Pane and every time I try to add an entry, I get this error: Your changes couldn’t be saved See the Console log for details. So what did the console log say? Fred -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 20, 2011, at 12:31 PM, amrit pal pathak wrote: Here you go. Amazing what you find on the Internet these days. http://tinyurl.com/3bp7nsh It tells to run the app on different ports,but i want to run it without giving any port like at example.com That's an implementation detail. All of the (non-secure) Web sites you visit that don't show a port use the *default* port 80. If you want to be completely pedantic, the URL for the Apple home page is http://www.apple.com:80/index.html. But when you type in www.apple.com , your browser first takes the leap of faith that you mean http:// (since it is a browser, after all) and then further assumes that you mean port 80, because you didn't top your URL with https:// or tail the domain with :443. Then, because you didn't enter a filename, the Apache server (or whatever they use there) looks up the DefaultIndex and fills that in for you, and performs a silent redirect (it doesn't tell you the exact details, so it could just as easily be index.php or index.erb or anything at all) to whatever that actual index file is, and THEN starts filling the sub-requests contained in that index file. You can read a lot more about this at the Apache site, in the httpd project documentation. Pick the version you use there, and read up on mod_rewrite and its cousins. Short answer, you can do this, it's done every day, and it's not that difficult. Slightly longer answer, you still haven't given any good reason why you would want to do this in the development environment. But have you looked at http://pow.cx/ for no-config local network hosting with a real domain? 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] I need help: No route matches /RailsApplication3
I have create a little app on netbeans 7. This is my first RoR app. when I run it I get the following error. Started GET /RailsApplication3 for 127.0.0.1 at Wed Apr 20 18:33:54 +0200 2011 ActionController::RoutingError (No route matches /RailsApplication3): Rendered /var/lib/gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms) -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: How to enable production enviornment in RoR 2.3.5
On 20 Apr 2011, at 18:22, amrit pal pathak amritpalpath...@gmail.com wrote: On Apr 20, 1:01 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Wed, Apr 20, 2011 at 11:21 AM, amritpal pathak amritpalpath...@gmail.com wrote: I want to enable production enviornment for my appication.The content of database.yml file is as # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: mysql database: amritpal username: root password: 12345 pool: 5 timeout: 5000 # 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: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: mysql database: production username: root password: 12345 pool: 5 timeout: 5000 I ran RAILS_ENV=production rake db:create ,it created a production database.Here is assume that the production enviornment is enable(But i was wrong).Then i created a simple scaffold as. script/generate scaffold person firstname:string lastname:string; rake db:migrate(it created a table namedpeople in amritpal database that is used in development envionrment.But in production enviornment ,the database production hasn't any talbe) How to enable it? Thanks I believe Colin already discussed with with you in another thread. As I have tried to explain several times the value of RAILS_ENV determines which environment will be used when you execute a rake command. The environment defaults to development. So: rake db:migrate will migrate the development db. RAILS_ENV=production rake db:migrate will migrate the production db. Colin If you are looking to be always running in production mode and never in any other mode then my advice would be the set the environment variable RAILS_ENV on your system to production. RAILS_ENV=production You can look up how to do that for your OS anywhere on the internet. At other thread ,i followed collin instrutions but at last i strucked a error to which i didnt receive a reply yet.So i post a new thread.Please look at that thread and see if you can help Next time try looking at the second page of the thread - Colin replied yesterday. Even if he hadn't, proliferation of identical threads helps no-one. Fred http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d911b888dbd30c58 Thanks -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rails 3.0 Internal Server Error - Not Enough Space
Max Schubert wrote in post #992663: On Wed, Apr 13, 2011 at 11:37 PM, Payal Patel li...@ruby-forum.com wrote: [2011-04-13 20:27:35] ERROR Errno::ENOMEM: Not enough space Have you checked to make sure the host or virtual machine you are running on has sufficient RAM? ENOMEM could indicate RAM starvation. - Max Hi Max, Do you have any pointers to increase RAM memory allocation to rails server? Like one can do in WebLogic or Apache webservers ? Thanks, Payal -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How can I remove bundler from my rails 3 app?
I've tried running this on Glassfish and got the exact same error, so it must be in the bundler code. I've removed bundler from the app and added the requires to the environment.rb file and did get this running. However, it's obviously not an ideal solution. On Apr 20, 12:13 am, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 20, 5:55 am, MJW2529 mjwhite2...@yahoo.com wrote: I'm using jruby 1.6.0 and trying to deploy my rails 3 app to Tomcat. When the app loads I get the error stack level too deep as bundler is trying to resolve dependencies. I've spent hours searching forums in an effort to resolve this but there doesn't seem to be a resolution to this problem. Can someone explain how I can remove bundler from my application so as I can get this deployed? It seems that bundler is tightly integrated with Rails 3. Hopefully Rails is not dependent on it since it makes it impossible to deploy to either Tomcat or the Glassfish server. Not sure about untangling rails 3 from bundler but I did findhttp://techblog.amphora-research.com/2011/03/tomcat-6-stack-level-too... which claims that this is a tomcat problem Fred -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] I need help: No route matches /RailsApplication3
On Wed, Apr 20, 2011 at 12:54 PM, hoboy Hoboy li...@ruby-forum.com wrote: I have create a little app on netbeans 7. This is my first RoR app. when I run it I get the following error. Started GET /RailsApplication3 for 127.0.0.1 at Wed Apr 20 18:33:54 +0200 2011 ActionController::RoutingError (No route matches /RailsApplication3): try pointing to http://localhost:3000 and report back what you get. You should not put your app name in the url. Also urls can be case sensitive. Rendered /var/lib/gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms) -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: How can I remove bundler from my rails 3 app?
On Wed, Apr 20, 2011 at 8:07 PM, MJW2529 mjwhite2...@yahoo.com wrote: I've tried running this on Glassfish and got the exact same error, so it must be in the bundler code. I've removed bundler from the app and added the requires to the environment.rb file and did get this running. However, it's obviously not an ideal solution. boot.rb starts this way: require 'rubygems' gemfile = File.expand_path('../../../../Gemfile', __FILE__) if File.exist?(gemfile) ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler' Bundler.setup end That's done on purpose, so that it is trivial to out-opt. Removing the Gemfile should be enough, if there's no Gemfile, no bundler code should be called (and if it does, it is a bug). -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Rails 3 Migration expecting test gems to be installed??
On Wed, Apr 20, 2011 at 2:55 AM, Frederick Cheung frederick.che...@gmail.com wrote: On 19 Apr 2011, at 11:30, johnnybutler7 johnnybutl...@gmail.com wrote: Aha thanks, i knew it would be something silly. The docs do suggest adding the gemfile.lock to your repository but based on this evidence thats not a good idea. I will need to find out how to manage this when deploying, do you add the production gemfile.lock to the repo I've never had to do this (and I seen to have many of the test gems you do (rspec , cucumber etc) Fred I suspected that your Gemfile.lock was set to the dev/test environment on your system and therefore was not set for the staging environment that you wanted it to be. Even though you said to run it in staging, Rails saw a Gemlock.file and checked that before executing the Gemfile. B. On Apr 18, 2:50 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Mon, Apr 18, 2011 at 5:43 AM, johnnybutler7 johnnybutl...@gmail.com wrote: Yes i did bundle install --without test and that worked fine, when i try the db migrate for staging i get the error, i could install all the gems as you say rspec is needed for other stuff possibly but the actual error for the autotest gem is because its specific to mac, the staging site is on linux. From reading the docs it seems to suggest that bundler will know what OS you are on and install the appropriate gem. The whole point of the grouping should be exactly for this reason, i shouldnt have to install test/dev gems on the staging/production server. Maybe its something silly im doing but but i can see what. You didn't happen to move over your Gemfile.lock from your mac to your staging server did you? If you did, try deleting that file and running the command again. B. On Apr 18, 11:16 am, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 15, 2:01 pm, johnnybutler7 johnnybutl...@gmail.com wrote: Hi, I have gem file set up so only the specific gems are installed/needed for each environment, so all the test gems like cucumber etc are grou[ed in test. When i try a rake db:migrate RAILS_ENV=staging on the staging server however i get an error saying gem is not installed, please use bundle install. I dont want the test gems installed on this server however when i run the migration on staging its expecting them to be installed. Anyone hit this problem before and how did you sort it, i cant find anything in the forums? did you run bundle install --without test --without development Some gems (like rspec) used to generate rake files that required rspec to be loaded, so when rails tried to load your rake tasks it would fail if those gems weren't there anymore. They don't anymore though, now that everyone has figured out the sensible ways of working with bundler - I'd try using a current versions of those gems and clearing out any unneeded rake task files. Fred JB -- 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+unsubscr...@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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: I need help: No route matches /RailsApplication3
http://localhost.3000/ Welcome aboard You’re riding Ruby on Rails! About your application’s environment Getting started Here’s how to get rolling: 1. Use rails generate to create your models and controllers To see all available options, run it without parameters. 2. Set up a default route and remove or rename this file Routes are set up in config/routes.rb. 3. Create your database Run rake db:migrate to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password. when I point to http://localhost:3000/RailsApplication3 Routing Error No route matches /RailsApplication3 -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: I need help: No route matches /RailsApplication3
On Wed, Apr 20, 2011 at 1:53 PM, hoboy Hoboy li...@ruby-forum.com wrote: http://localhost.3000/ Welcome aboard You’re riding Ruby on Rails! About your application’s environment Getting started Here’s how to get rolling: 1. Use rails generate to create your models and controllers To see all available options, run it without parameters. 2. Set up a default route and remove or rename this file Routes are set up in config/routes.rb. 3. Create your database Run rake db:migrate to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password. when I point to http://localhost:3000/RailsApplication3 Routing Error No route matches /RailsApplication3 right because unless you have a controller called RailsApplication3 you will *never* get there! So, if this is a new app and you have not done anything else, you need to generate a controller or maybe better a scaffold. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: I need help: No route matches /RailsApplication3
On Wed, Apr 20, 2011 at 1:53 PM, hoboy Hoboy li...@ruby-forum.com wrote: http://localhost.3000/ Welcome aboard You’re riding Ruby on Rails! About your application’s environment Getting started Here’s how to get rolling: 1. Use rails generate to create your models and controllers To see all available options, run it without parameters. 2. Set up a default route and remove or rename this file Routes are set up in config/routes.rb. 3. Create your database Run rake db:migrate to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password. when I point to http://localhost:3000/RailsApplication3 Routing Error No route matches /RailsApplication3 I think you will find this guide helpful in understanding your routing questions. http://guides.rubyonrails.org/routing.html B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: I need help: No route matches /RailsApplication3
On Wed, Apr 20, 2011 at 1:57 PM, Bryan Crossland bacrossl...@gmail.comwrote: On Wed, Apr 20, 2011 at 1:53 PM, hoboy Hoboy li...@ruby-forum.com wrote: http://localhost.3000/ Welcome aboard You’re riding Ruby on Rails! About your application’s environment Getting started Here’s how to get rolling: 1. Use rails generate to create your models and controllers To see all available options, run it without parameters. 2. Set up a default route and remove or rename this file Routes are set up in config/routes.rb. 3. Create your database Run rake db:migrate to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password. when I point to http://localhost:3000/RailsApplication3 Routing Error No route matches /RailsApplication3 I think you will find this guide helpful in understanding your routing questions. http://guides.rubyonrails.org/routing.html Right, also until you get comfortable I would highly recommend working through a good book or tutorial such as Agile Web Development with Rails. By just following some steps in such, a lot of things will start making more sense too. B. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: I need help: No route matches /RailsApplication3
Thanks guys -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Check that my sqlite database populated
Well, when I run .databases i see something like an empty grid clearly indicating that there is no database. I think i should see my rails' databases (the ones resulting populated from rails console as i said before). This is the first time i use sqlite but i think the command is right. I don't think i have 2 different instances of sqlite installed (one used by rails and another one where i use the .databases command). I can't understand where is my sqlite database populated via rails and how can i verify my tables via sqlite console queries. Thanks again Il giorno 20/apr/2011, alle ore 16:09, Bryan Crossland bacrossl...@gmail.com ha scritto: On Tue, Apr 19, 2011 at 4:27 PM, Federico federico.rot...@gmail.com wrote: Hello guys, I've made a very simple application following the footsteps of http://guides.rubyonrails.org/getting_started.html. I managed to insert my objects (i checked the existence of inserted objects through the rails console with a simple Foo.all ) but if I run sqlite3 from command line and then run .databases I can't see any database created. I thought I could see the databases set in my database.yml ( database: db/development.sqlite3 database: db/test.sqlite3 database: db/ production.sqlite3 ) but the .databases command shows nothing. sqlite3 --version 3.5.6 rails -v 3.0.5 O.S. Windows 7 You don't see any of the databases you expected to see. What do you see when you run .databases? B. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Composite index via command line migration, different behaviour in file
Thanks Fred, at least I'll stop bouncing my head against the wall trying to make my command work! I'll stick with your solution or mine. Il giorno 20/apr/2011, alle ore 09:39, Frederick Cheung frederick.che...@gmail.com ha scritto: On 19 Apr 2011, at 22:13, Federico federico.rot...@gmail.com wrote: Hello everybody, I have a class like this: class Foos ActiveRecord::Migration def self.up create_table :foos,:id = false, do |t| t.references :table1 t.references :table2 t.timestamps end end def self.down drop_table :foos end end I would like to add a composite index on the 2 columns :table1 and :table2 but the command rails generate migration add_index(:foos, [:table1_id, :table2_id], :unique = true) fails with the following output: Missing type for attribute '='. Example: '=:string' where string is the type. If I edit the up method of Foos like this: def self.up create_table :foos,:id = false, do |t| t.references :table1 t.references :table2 t.timestamps end add_index(:foos, [:table1_id, :table2_id], :unique = true) end then the index is successfully created. I can't understand why. I would like to create this composite index with a migration from command line. As far as I know there just isn't a command line shortcut for creating such a migration - create a blank one with rails g migration AddAnIndexToFoos And add your call to add_index in there. Fred Thanks Federico -- 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Check that my sqlite database populated
On Apr 20, 2011, at 3:17 PM, Federico Rota wrote: Well, when I run .databases i see something like an empty grid clearly indicating that there is no database. I think i should see my rails' databases (the ones resulting populated from rails console as i said before). This is the first time i use sqlite but i think the command is right. I don't think i have 2 different instances of sqlite installed (one used by rails and another one where i use the .databases command). I can't understand where is my sqlite database populated via rails and how can i verify my tables via sqlite console queries. Thanks again Try rails dbconsole or script/dbconsole (not sure which for whatever version you are using) for the abstracted view of your Rails database. This also responds to the development (default) production and test keywords to select a specific database. This may also be a clue -- are you looking for the development database but finding production or test? Walter Il giorno 20/apr/2011, alle ore 16:09, Bryan Crossland bacrossl...@gmail.com ha scritto: On Tue, Apr 19, 2011 at 4:27 PM, Federico federico.rot...@gmail.com wrote: Hello guys, I've made a very simple application following the footsteps of http://guides.rubyonrails.org/getting_started.html. I managed to insert my objects (i checked the existence of inserted objects through the rails console with a simple Foo.all ) but if I run sqlite3 from command line and then run .databases I can't see any database created. I thought I could see the databases set in my database.yml ( database: db/development.sqlite3 database: db/test.sqlite3 database: db/ production.sqlite3 ) but the .databases command shows nothing. sqlite3 --version 3.5.6 rails -v 3.0.5 O.S. Windows 7 You don't see any of the databases you expected to see. What do you see when you run .databases? B. -- 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+unsubscr...@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- t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rails 3 Crashing On Windows 7
On Apr 16, 12:20 pm, cipher_neo l33...@gmail.com wrote: sure: Hello, sorry for the late response, didn't monitor this group actively. C:\Windows\System32gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.5) actionpack (3.0.5) activemodel (3.0.5) activerecord (3.0.5) activeresource (3.0.5) activesupport (3.0.5, 2.3.11) annotate-models (1.0.4) archive-tar-minitar (0.5.2) arel (2.0.9) builder (2.1.2) bundler (1.0.10) cgi_multipart_eof_fix (2.5.0) columnize (0.3.2) configuration (1.2.0) diff-lcs (1.1.2) erubis (2.6.6) extlib (0.9.15) faker (0.9.5) gem_plugin (0.2.3) heroku (1.19.1) highline (1.6.1) i18n (0.5.0) launchy (0.3.7) linecache19 (0.5.11) mail (2.2.15) mime-types (1.16) minitest (1.6.0) mongrel (1.2.0.pre2 x86-mingw32) mysql2 (0.2.6 x86-mingw32) polyglot (0.3.1) populator (1.0.0) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.5) railties (3.0.5) rake (0.8.7) rdiscount (1.6.8) rdoc (2.5.8) rest-client (1.6.1) rhodes (2.3.2) ruby-debug-base19 (0.11.24) ruby-debug-ide19 (0.4.12) ruby-debug19 (0.11.6) ruby_core_source (0.1.4) templater (1.0.0) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.25) thanks for the reply On this list you have a couple of things: mongrel: is known that mongrel do not work with Rails 3, not even using rails server Remove that so Rails do not get confused. You also have mysql2, which like mysql gem, depends on a specific version of libmysql.dll I just closed a bug report on Ruby similar to yours: http://redmine.ruby-lang.org/issues/4573 Please see the comments, the outstanding issue was an incorrect version libmysql.dll Please verify that. -- Luis Lavena -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Mac Phusion Passenger Pane not working
I wasn't sure exactly which the console log was for the Passenger Pane. I checked all Apache logs as well as the development.log of the project. Frederick Cheung wrote in post #994089: On 20 Apr 2011, at 15:11, Clem Rock li...@ruby-forum.com wrote: I have a feeling that this is something centered around my apache/Passenger configurations but everything seems to check out. Another off the hand problem I'm having, and might be a clue is w/ my Passenger Pane. I installed the Phusion Passenger Pane and every time I try to add an entry, I get this error: Your changes couldnt be saved See the Console log for details. So what did the console log say? Fred -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: unable to set default_url_options on per environment basis
Thanks that worked perfectly On Apr 18, 6:05 am, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 17, 10:16 pm, charles d barryfrombarryvi...@gmail.com wrote: Im trying to set the default_url_options on a per environment basis but nothing is working. I keep getting Missing host to link to! Please provide :host parameter or set default_url_options[:host] post.rb def share_all url = Rails.application.routes.url_helpers.post_url(self) if user.authentications.where(:provider = 'twitter').any? user.twitter_share(url) end end I've tried adding this to my config/environments/development.rb : development.rb config.action_controller.default_url_options = {:host = localhost: 3000} which didn't work so I tried it this way: development.rb config.action_controller.default_url_options = {:host = localhost, :port = 3000} And that didnt work so I tried just defining the method in the application controller but it didnt work either. class ApplicationController ActionController::Base protect_from_forgery include ApplicationHelper def default_url_options { :host = example.com} end end What am I missing here? This is driving me nuts, thanks. I think you're not setting default_url_options in the correct place - you're using the named routes module in isolation (whereas normally that code would be called from within a controller or helper) so the stuff you're doing to ApplicationController doesn't come into place. Rails.application.routes.default_url_options[:host]= 'example.com' seems to do the trick Fred -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Cannot get progress bars to work w/ Apache Progress Module
Frederick, Thanks for your help as always. I adding the PassengerEnabled directive inside the location block as such: Location /progress # enable upload progress reports in /progress PassengerEnabled off ReportUploads On /Location I restarted apache and passenger and I'm still getting the 404: ActionController::RoutingError (No route matches /progress): On Apr 20, 2:48pm, Clem Rock li...@ruby-forum.com wrote: Location / # enable tracking uploads in / TrackUploads On /Location Location /progress # enable upload progress reports in /progress ReportUploads On /Location You need to tell passenger not to pass /progress to your rails app - eg by sticking PassengerEnabled off in that location block Fred -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] [Rails Plugin\Gem] How to show time, which your plugin spent in rails server log
Hi. Sorry for my terrible english. When user makes request to your server in log you could see smth like Completed 200 in 134 ms (Views: 12 ms ; ActiveRecord 1ms; Sphinx 0ms) I want my plugin to show information in this line, such Sphinx and Activerecord and Arel do. But after i waist 2 hours on google i have nothing. Where could i read how to implement this feature ? I really need it in my work -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Mac Phusion Passenger Pane not working
On Apr 20, 9:15 pm, Clem Rock li...@ruby-forum.com wrote: I wasn't sure exactly which the console log was for the Passenger Pane. I checked all Apache logs as well as the development.log of the project. open the console app (/applications/utilities/console) and check the console messages section Fred Frederick Cheung wrote in post #994089: On 20 Apr 2011, at 15:11, Clem Rock li...@ruby-forum.com wrote: I have a feeling that this is something centered around my apache/Passenger configurations but everything seems to check out. Another off the hand problem I'm having, and might be a clue is w/ my Passenger Pane. I installed the Phusion Passenger Pane and every time I try to add an entry, I get this error: Your changes couldnt be saved See the Console log for details. So what did the console log say? Fred -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How to show time, which your plugin spent in rails server log
On Apr 20, 5:44 pm, sadgb разумовский rasum...@gmail.com wrote: Hi. Sorry for my terrible english. When user makes request to your server in log you could see smth like Completed 200 in 134 ms (Views: 12 ms ; ActiveRecord 1ms; Sphinx 0ms) I want my plugin to show information in this line, such Sphinx and Activerecord and Arel do. But after i waist 2 hours on google i have nothing. Where could i read how to implement this feature ? Check instrumentation.rb in actionpack - it's what ActiveRecord hooks into Fred I really need it in my work -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Ruby On Rails 3 and Webrick
I have the same issues above, I've installed Homebrew. Now I cant get it to do the sudo app-get part. I understand that Mac does not have this functionality. What options do I have instead? Thanks for any help. Another noob -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Show more feature in Rails app
Oh wow thanks! But what's the most up-to-date solution? On Apr 20, 2:38 am, Walter Lee Davis wa...@wdstudio.com wrote: On Apr 19, 2011, at 11:33 PM, daze wrote: You know the very common Older posts/Show more link at the bottom of your Facebook news feed? You know, it functions as a way to show more posts or whatever... it generates more content and allows you to scroll down more. I'm kind of surprised there isn't a nice gem that creates that functionality... After all, it is common. It's kind of like will_paginate, I guess. I would love to make such a gem/plugin myself, but I don't have the experience/skills to This is just a thought to the Rails community - who knows, maybe there's someone out there who's looking for something to do... a plugin/gem like this would be awesome. :] http://railscasts.com/episodes/114-endless-page It's been done! 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Show more feature in Rails app
On Apr 20, 2011, at 6:11 PM, daze wrote: Oh wow thanks! But what's the most up-to-date solution? On Apr 20, 2:38 am, Walter Lee Davis wa...@wdstudio.com wrote: On Apr 19, 2011, at 11:33 PM, daze wrote: I would go on Github and type in rails endless or rails pageless in the search field, and see what pops up. Walter You know the very common Older posts/Show more link at the bottom of your Facebook news feed? You know, it functions as a way to show more posts or whatever... it generates more content and allows you to scroll down more. I'm kind of surprised there isn't a nice gem that creates that functionality... After all, it is common. It's kind of like will_paginate, I guess. I would love to make such a gem/plugin myself, but I don't have the experience/skills to This is just a thought to the Rails community - who knows, maybe there's someone out there who's looking for something to do... a plugin/gem like this would be awesome. :] http://railscasts.com/episodes/114-endless-page It's been done! 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- t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Show more feature in Rails app
daze wrote in post #993901: You know the very common Older posts/Show more link at the bottom of your Facebook news feed? You know, it functions as a way to show more posts or whatever... it generates more content and allows you to scroll down more. I'm kind of surprised there isn't a nice gem that creates that functionality... After all, it is common. It's kind of like will_paginate, I guess. I would love to make such a gem/plugin myself, but I don't have the experience/skills to This is just a thought to the Rails community - who knows, maybe there's someone out there who's looking for something to do... a plugin/gem like this would be awesome. I have seen a number of implementations of this, but by far the best one I have seen is implemented on the Apple store. They have implemented this endless page concept in a way the user barely notices it (as long as they have a decently fast internet connection). One of the issues with the endless page is how to deal with the scroll bar. On many endless page implementations I've seen, the scrollbar is practically useless. Often the use may try to guess that what they are looking for will be found near the end of the list. They may try to grab the scrollbar thumb and pull it to the bottom of the scrollbar. A lot of the endless page solutions don't handle this well at all. The trick employed in the endless page implementation on the Apple store (best example know of using this technique) is to create a container DIV large enough to hold the entire results. This forces the scrollbar to behave properly. In order to do this one must be able to calculate the total size of the unpaginated result set. This isn't too bad if you are able to render each item with the equal vertical heights. This is the case for many scenarios, but not all. Using AJAX each row is fetched and displayed as the row gets scrolled into view. You'll noticed that the Apple store uses their standard spinner/loading animated icon and then nicely fades in the row/cell content. It's a very nice effect for those cases where this works. Example: http://store.apple.com/us/browse/home/shop_ipod/ipod_accessories/headphones?mco=MTM5MTc2OTU -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Ruby On Rails 3 and Webrick
David F. wrote in post #994133: I have the same issues above, I've installed Homebrew. Now I cant get it to do the sudo app-get part. I understand that Mac does not have this functionality. What options do I have instead? Explain this. 1. Did you really mean apt-get instead of app-get. I have no idea what app-get is, never heard of it if it does exist. 2. What do you mean by can't get it to do the sudo app-get part. What happens? Do you get errors? What are they? 3. What operating system are you using? The apt-get command only works for certain Linux distributions. Other platforms use different package managers with different commands. RedHat for example uses rpm (RedHat Package Manager) by default, instead of apt-get (Debian/Ubuntu). 4. If you happen to be on a Mac then there are several choices for these types of package managers. The Mac doesn't ship with any of them because the Mac has a native package installer system using the built-in Installer services provided by Mac OS X. These packages are called dpkg (Darwin Package, where Darwin is the low level UNIX OS of Mac OS X). Other package managers for OS X have been created by the open source community, which include Macports, Fink, Homebrew, etc. IMHO Homebrew is the only one worth using. I have never liked how intrusive the other solutions can be on my system. Homebrew is light weight and non-intrusive, not to mention full of awesomeness. But, that is a matter of opinion. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] ActiveMerchant with Amazon's FPS
On Wed, Apr 20, 2011 at 6:11 AM, News Aanad news.anan...@gmail.com wrote: Hi, I want to integrate Amazon's FPS service using Activemerchant. I want to know that activemerchant support that? and if yes, then can you please suggest any site to integrate Amazon's FPS? The answer is no it does not. At least not according to the documentation for ActiveMerchant. http://activemerchant.rubyforge.org/ B. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Show more feature in Rails app
Okay, but it doesn't have to be AUTOMATIC... I mean Facebook has a very nice show more button at the bottom of its news feed so you only show more if you want to. And I could potentially have an unordered list of hundreds of things so I don't think the div strategy you mentioned would be good... On Apr 20, 6:54 pm, Robert Walker li...@ruby-forum.com wrote: daze wrote in post #993901: You know the very common Older posts/Show more link at the bottom of your Facebook news feed? You know, it functions as a way to show more posts or whatever... it generates more content and allows you to scroll down more. I'm kind of surprised there isn't a nice gem that creates that functionality... After all, it is common. It's kind of like will_paginate, I guess. I would love to make such a gem/plugin myself, but I don't have the experience/skills to This is just a thought to the Rails community - who knows, maybe there's someone out there who's looking for something to do... a plugin/gem like this would be awesome. I have seen a number of implementations of this, but by far the best one I have seen is implemented on the Apple store. They have implemented this endless page concept in a way the user barely notices it (as long as they have a decently fast internet connection). One of the issues with the endless page is how to deal with the scroll bar. On many endless page implementations I've seen, the scrollbar is practically useless. Often the use may try to guess that what they are looking for will be found near the end of the list. They may try to grab the scrollbar thumb and pull it to the bottom of the scrollbar. A lot of the endless page solutions don't handle this well at all. The trick employed in the endless page implementation on the Apple store (best example know of using this technique) is to create a container DIV large enough to hold the entire results. This forces the scrollbar to behave properly. In order to do this one must be able to calculate the total size of the unpaginated result set. This isn't too bad if you are able to render each item with the equal vertical heights. This is the case for many scenarios, but not all. Using AJAX each row is fetched and displayed as the row gets scrolled into view. You'll noticed that the Apple store uses their standard spinner/loading animated icon and then nicely fades in the row/cell content. It's a very nice effect for those cases where this works. Example:http://store.apple.com/us/browse/home/shop_ipod/ipod_accessories/head... -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: How can I remove bundler from my rails 3 app?
Thanks Xaviar. This is very useful since I want to run bundler when I push the code over so as I get the gems installed, but then exclude it in the war file to run under Tomcat. On Apr 20, 11:17 am, Xavier Noria f...@hashref.com wrote: On Wed, Apr 20, 2011 at 8:07 PM, MJW2529 mjwhite2...@yahoo.com wrote: I've tried running this on Glassfish and got the exact same error, so it must be in the bundler code. I've removed bundler from the app and added the requires to the environment.rb file and did get this running. However, it's obviously not an ideal solution. boot.rb starts this way: require 'rubygems' gemfile = File.expand_path('../../../../Gemfile', __FILE__) if File.exist?(gemfile) ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler' Bundler.setup end That's done on purpose, so that it is trivial to out-opt. Removing the Gemfile should be enough, if there's no Gemfile, no bundler code should be called (and if it does, it is a bug). -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] GEMFile gem 'mysql2' and mysql version is 4.1.2
Hi all I have a Gemfile with this value gem 'mysql2' but when I run this command '$ bundle install' on my host they said that The command bundle install --local seems to be returning mysql2 dependency error now. Unfortunately mysql2 gem requires mysql 5.1+ ( refer: https://github.com/brianmario/mysql2/issues/109 ) whereas the server mysql version is 4.1.2. Since you are on a shared server, it is not possible to upgrade mysql version as it may affect many other users in the same server. how can I replace the expression gem 'mysql2' created by default when I run 'rails new mystore -d=mysql' to run with mysql 4.1.2? I am trying to install Spree following this link http://spreecommerce.com/documentation/getting_started.html Please advise! -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails]
HI, Having just installed attribute_fu I'm getting the error ArgumentError in DogsController#new Unknown key(s): attributes, discard_if I assume this is coming from my model has_many parameters :attributes = true, :discard_if = proc { |upload| upload.photo_file_size.nil? I can only assume that I need an include or some path option somewhere or I havent set up attribute_fu properly? -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Unknown key(s): attributes, discard_if
HI, Having just installed attribute_fu I'm getting the error ArgumentError in DogsController#new Unknown key(s): attributes, discard_if I assume this is coming from my model has_many parameters :attributes = true, :discard_if = proc { |upload| upload.photo_file_size.nil? I can only assume that I need an include or some path option somewhere or I havent set up attribute_fu properly? -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3.11 and carrierwave, can't find generator
I added carrierwave to a 2.3.11 app that I have updated with Bundler. I just tried to use the following: script/generate uploader Avatar The following error is coming back: NOTE: Gem.cache is deprecated, use Gem::source_index. It will be removed on or after 2011-08-01. Gem.cache called from /Library/Ruby/Gems/1.8/gems/rails-2.3.11/lib/ rails_generator/lookup.rb:234 . Couldn't find 'uploader' generator -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.