Re: [Rails] running rails on my linux mint
It seems to be looking for your development database. On Apr 13, 2013 5:30 PM, Ahmed saidi ahmed.said...@gmail.com wrote: Hi i cannot start my rails server webrick and i m just start learning rails .. the error i get is: /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /sbin in PATH, mode 040777 /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /sbin in PATH, mode 040777 = Booting WEBrick = Rails 3.2.13 application starting in development on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server Exiting /var/lib/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Unknown database 'simple_pod_development' (Mysql2::Error) from /var/lib/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `send' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `checkout' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `checkout' from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `connection' from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection' from /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88 from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec' from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run' from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `run_initializers' from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each' from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers' from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!' from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `send' from /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing' from /opt/lampp/htdocs/pod/simple_pod/config/environment.rb:5 from /opt/lampp/htdocs/pod/simple_pod/config.ru:3:in `require' from /opt/lampp/htdocs/pod/simple_pod/config.ru:3 from /var/lib/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval' from /var/lib/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize' from /opt/lampp/htdocs/pod/simple_pod/config.ru:0:in `new' from /opt/lampp/htdocs/pod/simple_pod/config.ru:0 any help please -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/W4CkD1FV4dcJ. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and
[Rails] Cannot reach http://localhost:3000 after starting Ruby on Rails server
I cannot reach http://localhost:3000 after starting Ruby on Rails server when running Windows 8. After running rails server in the directory that I want the server to start, the following prompt shows up: C:\Users\Brian\railsapprails server = Booting WEBrick = Rails 3.2.13 application starting in development on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server Exiting C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/ rubygems_integ ration.rb:214:in `block in replace_gem': Please install the sqlite3 adapter: `ge m install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.) (LoadError) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/connection_adapters/sqlite3_adapter.rb:3:in `top (required)' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/dependencies.rb:251:in `require' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/dependencies.rb:251:in `block in require' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/dependencies.rb:236:in `load_dependency' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/dependencies.rb:251:in `require' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/connection_adapters/abstract/connection_specification.rb: 50:in `resol ve_hash_connection' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/connection_adapters/abstract/connection_specification.rb: 41:in `resol ve_string_connection' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/connection_adapters/abstract/connection_specification.rb: 25:in `spec' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/connection_adapters/abstract/connection_specification.rb: 130:in `esta blish_connection' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/railtie.rb:82:in `block (2 levels) in class:Railtie' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/lazy_load_hooks.rb:36:in `instance_eval' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/lazy_load_hooks.rb:36:in `execute_hook' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/lazy_load_hooks.rb:43:in `block in run_load_hooks' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/lazy_load_hooks.rb:42:in `each' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activesupport-3.2.13/lib/ac tive_support/lazy_load_hooks.rb:42:in `run_load_hooks' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/base.rb:720:in `top (required)' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ activerecord-3.2.13/lib/act ive_record/railtie.rb:88:in `block in class:Railtie' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/i nitializable.rb:30:in `instance_exec' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/i nitializable.rb:30:in `run' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/i nitializable.rb:55:in `block in run_initializers' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/i nitializable.rb:54:in `each' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/i nitializable.rb:54:in `run_initializers' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/a pplication.rb:136:in `initialize!' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/r ailtie/configurable.rb:30:in `method_missing' from C:/Users/Brian/railsapp/config/environment.rb:5:in `top (required) ' from C:/Users/Brian/railsapp/config.ru:3:in `require' from C:/Users/Brian/railsapp/config.ru:3:in `block in main' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/ rack/builder .rb:51:in `instance_eval' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/ rack/builder .rb:51:in `initialize' from C:/Users/Brian/railsapp/config.ru:in `new' from C:/Users/Brian/railsapp/config.ru:in `main' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/ rack/builder .rb:40:in `eval' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/ rack/builder .rb:40:in `parse_file' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/ rack/server. rb:200:in `app' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/ lib/rails/c ommands/server.rb:46:in `app' from
Re: [Rails] Cannot reach http://localhost:3000 after starting Ruby on Rails server
On 13 April 2013 21:26, CatGuy90 brian.h.lee...@gmail.com wrote: I cannot reach http://localhost:3000 after starting Ruby on Rails server when running Windows 8. After running rails server in the directory that I want the server to start, the following prompt shows up: C:\Users\Brian\railsapprails server = Booting WEBrick = Rails 3.2.13 application starting in development on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server Exiting C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/ rubygems_integ ration.rb:214:in `block in replace_gem': Please install the sqlite3 adapter: `ge m install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.) (LoadError) The error is saying that it cannot find the sqlite3 adaptor. Have you run bundle install [snip] After going to Internet Explorer 10, I tried to access http://localhost:3000, and I got a This page can't be displayed error. I tried doing telnet localhost 3000 in the Command Prompt, and I got a Could not open connection to the host, on port 3000 error. I also tried modifying C:\Windows\System32\drivers\etc\hosts, removing the # symbol for one of the localhost entries, but I still could not access http://localhost:3000. Please help me with this issue. Thank you. Since the server has exited that is not really surprising. Error messages can be daunting but it is always worth reading them to try and work out what the problem is. Colin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Cannot reach http://localhost:3000 after starting Ruby on Rails server
According to the stack trace sqlite3 isn't part of the bundle, so bundle install wouldn't help without adding it first. Also most rails devs use Linux or Mac for their work so I would advice the OP to use a VM with Ubuntu or set the machine up for dual boot. The chance to get help is much higher since he hasn't to cope with windows specific errors for himself. Am 14.04.2013 14:32 schrieb Colin Law clan...@googlemail.com: On 13 April 2013 21:26, CatGuy90 brian.h.lee...@gmail.com wrote: I cannot reach http://localhost:3000 after starting Ruby on Rails server when running Windows 8. After running rails server in the directory that I want the server to start, the following prompt shows up: C:\Users\Brian\railsapprails server = Booting WEBrick = Rails 3.2.13 application starting in development on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server Exiting C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/ rubygems_integ ration.rb:214:in `block in replace_gem': Please install the sqlite3 adapter: `ge m install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.) (LoadError) The error is saying that it cannot find the sqlite3 adaptor. Have you run bundle install [snip] After going to Internet Explorer 10, I tried to access http://localhost:3000, and I got a This page can't be displayed error. I tried doing telnet localhost 3000 in the Command Prompt, and I got a Could not open connection to the host, on port 3000 error. I also tried modifying C:\Windows\System32\drivers\etc\hosts, removing the # symbol for one of the localhost entries, but I still could not access http://localhost:3000. Please help me with this issue. Thank you. Since the server has exited that is not really surprising. Error messages can be daunting but it is always worth reading them to try and work out what the problem is. Colin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Cannot reach http://localhost:3000 after starting Ruby on Rails server
On 14 April 2013 16:44, Norbert Melzer timmel...@gmail.com wrote: According to the stack trace sqlite3 isn't part of the bundle, so bundle install wouldn't help without adding it first. OK, I was not sure whether the error meant that it is not part of the installed bundle or is missing from Gemfile itself, though I have to admit that the error message is specific. @CatGuy90 I would have expected sqlite to be included in Gemfile be default, have you removed it yourself? Colin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] How todiffer if params are set through form or through url
Is there a way to differ if params are set through form submit: %= form_tag action: 'login', method: :put do % %= text_field('record','username') % %= password_field('record','password') % %= submit_tag % or through url http://some.site/login?record[username]=userrecord[password]=pwd In both cases they appear in controller as params[:record][:user] and params[:record][:password] The idea is to prevent the second scenario. by TheR -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] How todiffer if params are set through form or through url
On 14 April 2013 17:13, Damjan Rems li...@ruby-forum.com wrote: Is there a way to differ if params are set through form submit: %= form_tag action: 'login', method: :put do % %= text_field('record','username') % %= password_field('record','password') % %= submit_tag % or through url http://some.site/login?record[username]=userrecord[password]=pwd In both cases they appear in controller as params[:record][:user] and params[:record][:password] The second one will appear as a GET, not a POST. Colin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: How to create 10000 pseudo data for Testing in RoR
One approach may be to build the data as a large csv. Which you could do from ruby if you wished and you can then keep as a file. Then either import directly to the db with sql or workbench etc. or if you want to stay ruby, load the csv and use ar_extension import to dump the data into the db. On Friday, 5 April 2013 16:08:04 UTC+1, Ruby-Forum.com User wrote: I want to test performance of project. So i want make 1 record of table for testing. I don't know how to ganerate record. Who can help me? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/sZheFpnQ2wkJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] How to initialize variables automatically on application bootstrap?
How to set some variables on bootstap? I need a few variables to be initialized with default values every request. For example in ZF there is a class Bootstrap whose methods are called automatically every request. Is there something similar in Rails? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] How to initialize variables automatically on application bootstrap?
On Sun, Apr 14, 2013 at 5:26 PM, Wins Lin li...@ruby-forum.com wrote: How to set some variables on bootstap? I need a few variables to be initialized with default values every request. For example in ZF there is a class Bootstrap whose methods are called automatically every request. Is there something similar in Rails? Do these need to be initialized before configuration? If not, you can put them in config/initializers/ -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] How to initialize variables automatically on application bootstrap?
On Sun, Apr 14, 2013 at 6:31 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Sun, Apr 14, 2013 at 5:26 PM, Wins Lin li...@ruby-forum.com wrote: How to set some variables on bootstap? I need a few variables to be initialized with default values every request. For example in ZF there is a class Bootstrap whose methods are called automatically every request. Is there something similar in Rails? Do these need to be initialized before configuration? If not, you can put them in config/initializers/ Never mind, I mis-read what you wrote. ZF I'm assuming is Zend Framework, aka, PHP? Which works nothing like Rails, btw, as you are essentially restarting the entire application with every request in PHP. The Rails application is not brought up and shut down for every request. It lives in a long running process. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] How to initialize variables automatically on application bootstrap?
Maybe hardcoding them in a before_filter on ApplicationController... Which kind of variables are you talking about? Where do you plan to use them? 2013/4/14 tamouse mailing lists tamouse.li...@gmail.com On Sun, Apr 14, 2013 at 6:31 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Sun, Apr 14, 2013 at 5:26 PM, Wins Lin li...@ruby-forum.com wrote: How to set some variables on bootstap? I need a few variables to be initialized with default values every request. For example in ZF there is a class Bootstrap whose methods are called automatically every request. Is there something similar in Rails? Do these need to be initialized before configuration? If not, you can put them in config/initializers/ Never mind, I mis-read what you wrote. ZF I'm assuming is Zend Framework, aka, PHP? Which works nothing like Rails, btw, as you are essentially restarting the entire application with every request in PHP. The Rails application is not brought up and shut down for every request. It lives in a long running process. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Ricardo Franco Andrade ( Web | Desktop | Game ) Developer email: ricardo.kr...@gmail.com phone: +55 (86) 9436 0830 linkedin: http://www.linkedin.com/pub/ricardo-franco/61/2b0/857 skype: ricardo.krieg github: https://github.com/ricardokrieg twitter: twitter.com/ricardokrieg facebooK: https://www.facebook.com/krieg.ricardo -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] update image name paperclip s3
Hello, How can I rename image name while updating/adding the image in s3 through paperclip? Thanks, Avi -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/oFL3V3NBvUsJ. For more options, visit https://groups.google.com/groups/opt_out.