[Rails] Rails Integrate with Webrtc
Hi All, I need to implement video chat function in my rails application. Could anyone tell how will do that using Webrtc . -- 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/msgid/rubyonrails-talk/74065d2d-98f1-4350-95ec-7b4d9c64fb85%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Strange behaviour with the create_xxx on has_one association
I have models like this: class User ActiveRecord::Base has_one :user_preference, dependent: :destroy end class UserPreference ActiveRecord::Base belongs_to :user end It works fine when I call this: $ user.create_user_preference (0.3ms) BEGIN User Load (0.9ms) SELECT users.* FROM users WHERE users.deleted_at IS NULL AND users.id = $1 LIMIT 1 [[id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] UserPreference Exists (0.7ms) SELECT 1 AS one FROM user_preferences WHERE user_preferences.user_id = '055df158-4b3f-43f0-b73a-0c14e0ba7723' LIMIT 1 SQL (0.5ms) INSERT INTO user_preferences (created_at, updated_at, user_id) VALUES ($1, $2, $3) RETURNING id [[created_at, 2014-12-08 08:45:57.630670], [updated_at, 2014-12-08 08:45:57.630670], [user_id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] (1.5ms) COMMIT (0.2ms) BEGIN (0.2ms) COMMIT But, if I call that method again, it will delete the `profile` record. $ user.create_user_preference (0.3ms) BEGIN User Load (0.8ms) SELECT users.* FROM users WHERE users. deleted_at IS NULL AND users.id = $1 LIMIT 1 [[id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] UserPreference Exists (0.7ms) SELECT 1 AS one FROM user_preferences WHERE user_preferences.user_id = '055df158-4b3f-43f0-b73a-0c14e0ba7723' LIMIT 1 (0.3ms) ROLLBACK (0.2ms) BEGIN SQL (0.4ms) DELETE FROM user_preferences WHERE user_preferences.id = $1 [[id, 9eb6cabd-7c50-4f2b-8562-1159e1c2f4b4]] (37.0ms) COMMIT It looks weird for me. Is it a normal behaviour, or am I doing something wrong?? -- 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/msgid/rubyonrails-talk/59a5e1ac-8aba-492d-9cb2-da27819966e5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Rails Integrate with Webrtc
I'd recommend you not to re-invent the wheel and use bbb or appear.in or talky On Mon, Dec 8, 2014 at 2:06 PM, Parth S parthisiva...@gmail.com wrote: Hi All, I need to implement video chat function in my rails application. Could anyone tell how will do that using Webrtc . -- 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/msgid/rubyonrails-talk/74065d2d-98f1-4350-95ec-7b4d9c64fb85%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/74065d2d-98f1-4350-95ec-7b4d9c64fb85%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CAFKVRj_7aYzjbrK4j3cRc-XwDBPUSoPcDxPhqi6%2Bd0ni7s%2B4yw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Strange behaviour with the create_xxx on has_one association
This behavior is normal. When a record already exists for has_one, it deletes the previously existing record for database consistency ( has_many ) . It is a bit similar to has_and_belongs_to_many when you have User has_and_belongs_to_many categories. user.categories_ids = [4,5,6] #some array of category ids its deletes all the existing records and replace it with the new ones. Cheers On Mon, Dec 8, 2014 at 2:18 PM, Man Vuong Ha Thanh thanhman...@gmail.com wrote: I have models like this: class User ActiveRecord::Base has_one :user_preference, dependent: :destroy end class UserPreference ActiveRecord::Base belongs_to :user end It works fine when I call this: $ user.create_user_preference (0.3ms) BEGIN User Load (0.9ms) SELECT users.* FROM users WHERE users.deleted_at IS NULL AND users.id = $1 LIMIT 1 [[id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] UserPreference Exists (0.7ms) SELECT 1 AS one FROM user_preferences WHERE user_preferences.user_id = '055df158-4b3f-43f0-b73a-0c14e0ba7723' LIMIT 1 SQL (0.5ms) INSERT INTO user_preferences (created_at, updated_at, user_id) VALUES ($1, $2, $3) RETURNING id [[created_at, 2014-12-08 08:45:57.630670], [updated_at, 2014-12-08 08:45:57.630670], [user_id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] (1.5ms) COMMIT (0.2ms) BEGIN (0.2ms) COMMIT But, if I call that method again, it will delete the `profile` record. $ user.create_user_preference (0.3ms) BEGIN User Load (0.8ms) SELECT users.* FROM users WHERE users. deleted_at IS NULL AND users.id = $1 LIMIT 1 [[id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] UserPreference Exists (0.7ms) SELECT 1 AS one FROM user_preferences WHERE user_preferences.user_id = '055df158-4b3f-43f0-b73a-0c14e0ba7723' LIMIT 1 (0.3ms) ROLLBACK (0.2ms) BEGIN SQL (0.4ms) DELETE FROM user_preferences WHERE user_preferences. id = $1 [[id, 9eb6cabd-7c50-4f2b-8562-1159e1c2f4b4]] (37.0ms) COMMIT It looks weird for me. Is it a normal behaviour, or am I doing something wrong?? -- 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/msgid/rubyonrails-talk/59a5e1ac-8aba-492d-9cb2-da27819966e5%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/59a5e1ac-8aba-492d-9cb2-da27819966e5%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CAFKVRj9yWo0KBe%2BCRN5G2Zjn2T_jnW%3DtxBeeit0d%2BDhsP-t1Rg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Re: Strange behaviour with the create_xxx on has_one association
On Monday, December 8, 2014 8:48:37 AM UTC, Man Vuong Ha Thanh wrote: But, if I call that method again, it will delete the `profile` record. $ user.create_user_preference (0.3ms) BEGIN User Load (0.8ms) SELECT users.* FROM users WHERE users. deleted_at IS NULL AND users.id = $1 LIMIT 1 [[id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] UserPreference Exists (0.7ms) SELECT 1 AS one FROM user_preferences WHERE user_preferences.user_id = '055df158-4b3f-43f0-b73a-0c14e0ba7723' LIMIT 1 (0.3ms) ROLLBACK (0.2ms) BEGIN SQL (0.4ms) DELETE FROM user_preferences WHERE user_preferences. id = $1 [[id, 9eb6cabd-7c50-4f2b-8562-1159e1c2f4b4]] (37.0ms) COMMIT It looks weird for me. Is it a normal behaviour, or am I doing something wrong?? Well the delete makes sense to me - you're creating a new user preference, so the old one should be destroyed since this is a has_one and you've configured the relationship as dependent: :destroy. Not sure why it doesn't create a new one though Fred -- 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/msgid/rubyonrails-talk/7ecc668a-6ba5-40bc-8628-16f151e99b89%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Re: Strange behaviour with the create_xxx on has_one association
The new one is obviously failing a validation on the user or user_preference . Check the object for any validation errors. On Mon, Dec 8, 2014 at 3:31 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Monday, December 8, 2014 8:48:37 AM UTC, Man Vuong Ha Thanh wrote: But, if I call that method again, it will delete the `profile` record. $ user.create_user_preference (0.3ms) BEGIN User Load (0.8ms) SELECT users.* FROM users WHERE users. deleted_at IS NULL AND users.id = $1 LIMIT 1 [[id, 055df158-4b3f-43f0-b73a-0c14e0ba7723]] UserPreference Exists (0.7ms) SELECT 1 AS one FROM user_preferences WHERE user_preferences.user_id = '055df158-4b3f-43f0-b73a- 0c14e0ba7723' LIMIT 1 (0.3ms) ROLLBACK (0.2ms) BEGIN SQL (0.4ms) DELETE FROM user_preferences WHERE user_preferences. id = $1 [[id, 9eb6cabd-7c50-4f2b-8562-1159e1c2f4b4]] (37.0ms) COMMIT It looks weird for me. Is it a normal behaviour, or am I doing something wrong?? Well the delete makes sense to me - you're creating a new user preference, so the old one should be destroyed since this is a has_one and you've configured the relationship as dependent: :destroy. Not sure why it doesn't create a new one though Fred -- 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/msgid/rubyonrails-talk/7ecc668a-6ba5-40bc-8628-16f151e99b89%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/7ecc668a-6ba5-40bc-8628-16f151e99b89%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CAFKVRj8n_ynWAdW4dHy5hbysgMfr%2Bphq%2B3a7bRJcTGFjsDkNdQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Re: Why does this test fail.
Normally that problem occurs when you have a weird nesting or the naming of the controller compared to the test name is not correct as you can see in this 2 posts: http://stackoverflow.com/questions/14267506/keep-getting-controller-is-nil-error http://stackoverflow.com/questions/7743059/how-do-i-get-rid-of-controller-is-nil-error-in-my-tests I only use rspec so I am not sure that this: https://gist.github.com/andreorvalho/b306e186e888b1eccab5 has the correct syntax. does the test for delete at the end fail too? -- 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/msgid/rubyonrails-talk/e60431fb-e51c-4d4d-b742-c9083631efed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Re: No such file to load error
I'm getting this error in my script. Can someone help me figure out what I'm missing on my code. Thank you. Gem::LoadError: Could not find selenium-client (= 0) amongst [actionmailer-2.3.8, actionpack-2.3.8, activerecord-2.3.8, activerecord-jdbc-adapter-0.9.6-java, activerecord-jdbcmysql-adapter-0.9.6-java, activerecord-jdbcpostgresql-adapter-0.9.6-java, activeresource-2.3.8, activesupport-2.3.8, columnize-0.3.6, diff-lcs-1.1.3, jdbc-mysql-5.0.4, jdbc-postgres-8.4.702-java, linecache-0.46-java, rack-1.1.0, rails-2.3.8, rake-10.0.4, rake-10.0.3, rcov-0.8.1.5.0-java, rspec-2.13.0, rspec-core-2.13.1, rspec-expectations-2.13.0, rspec-mocks-2.13.0, ruby-debug-0.10.5.rc2, ruby-debug-base-0.10.5.rc2-java, ruby-debug-ide-0.4.17.beta14] to_specs at C:/Users/gene/AppData/Roaming/NetBeans/8.0.1/jruby/lib/ruby/shared/rubygems/dependency.rb:247 to_spec at C:/Users/gene/AppData/Roaming/NetBeans/8.0.1/jruby/lib/ruby/shared/rubygems/dependency.rb:256 gem at C:/Users/gene/AppData/Roaming/NetBeans/8.0.1/jruby/lib/ruby/shared/rubygems.rb:1231 (root) at C:\Users\gene\Projects\lib\roche.rb:3 -- 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/msgid/rubyonrails-talk/6c32ceef0a654af6ff53771bf399883d%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Re: Why does this test fail.
On Sunday, 7 December 2014 11:50:57 UTC-6, Roelof Wobben wrote: Hello, Sorry for the double post but on reddit nobody seems to have the solution. im following the agile web developement book but then with my own layout. Now am at chapter 9 where a shopping card is added. But as soon as I try to test the card I see this error LineItemsControllerTest#test_should_create_line_item: RuntimeError: @controller is nil: make sure you set it in your test's setup method. my code can be found here : *https://github.com/roelof1967/commerce-try* https://github.com/roelof1967/commerce-try Who can help me figure out why this test is failing. According to the book it must all be successfull. Roelof The file in app/controllers/concerns is not named correctly - it declares a `CurrentCart` module, but is named `current_card.rb`. Fixing that makes all the tests pass. --Matt Jones -- 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/msgid/rubyonrails-talk/aa90b74b-f550-41cd-9056-a77ca944822f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Re: Why does this test fail.
Op maandag 8 december 2014 12:42:14 UTC+1 schreef Matt Jones: On Sunday, 7 December 2014 11:50:57 UTC-6, Roelof Wobben wrote: Hello, Sorry for the double post but on reddit nobody seems to have the solution. im following the agile web developement book but then with my own layout. Now am at chapter 9 where a shopping card is added. But as soon as I try to test the card I see this error LineItemsControllerTest#test_should_create_line_item: RuntimeError: @controller is nil: make sure you set it in your test's setup method. my code can be found here : *https://github.com/roelof1967/commerce-try* https://github.com/roelof1967/commerce-try Who can help me figure out why this test is failing. According to the book it must all be successfull. Roelof The file in app/controllers/concerns is not named correctly - it declares a `CurrentCart` module, but is named `current_card.rb`. Fixing that makes all the tests pass. --Matt Jones I found it . The problem was in the name. When I change it to current_cart.rb it worked fine. Roelof -- 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/msgid/rubyonrails-talk/920d8aee-2f3d-4632-bb20-7bc3474a6ac0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Rails] No route matches {:action=show, :controller=carts} missing required keys: [:id]
Hello, I follow the Agile Web development book. Now as a extra challenge I try to make the card visible on a seperate page. So I made this link : li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path % /li But now I see the above error message. When I do card_path (:id) I see a message that there is no card with the id of id. Roelof -- 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/msgid/rubyonrails-talk/9442f58f-58b5-475e-823d-c797431c41c3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] No route matches {:action=show, :controller=carts} missing required keys: [:id]
What is the url you're using to show this on a separate page ? if its in the pattern of /cards/:id/something then you dont have to provide the card path as rails picks up @card object to build the path or you'll have to pass the card variable inside the path method. eg % @cards.each do |card| % li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(card) % /li % end % This way, rails would know which exact card this link should take them to. On Mon, Dec 8, 2014 at 6:48 PM, Roelof Wobben rwob...@hotmail.com wrote: Hello, I follow the Agile Web development book. Now as a extra challenge I try to make the card visible on a seperate page. So I made this link : li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path % /li But now I see the above error message. When I do card_path (:id) I see a message that there is no card with the id of id. Roelof -- 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/msgid/rubyonrails-talk/9442f58f-58b5-475e-823d-c797431c41c3%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/9442f58f-58b5-475e-823d-c797431c41c3%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CAFKVRj9PWK_Zdaa_81Ufi8ps03mwt2ScRZn%3DQ3zW9aiG2eN27g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] No route matches {:action=show, :controller=carts} missing required keys: [:id]
Hello, It's is the form of /cards/:id I tried li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(cart) % /li li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(card) % /li but on both I see this message : undefined local variable or method `cart' undefined local variable or method `card' Roelof Op maandag 8 december 2014 14:23:33 UTC+1 schreef Vivek Sampara: What is the url you're using to show this on a separate page ? if its in the pattern of /cards/:id/something then you dont have to provide the card path as rails picks up @card object to build the path or you'll have to pass the card variable inside the path method. eg % @cards.each do |card| % li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(card) % /li % end % This way, rails would know which exact card this link should take them to. On Mon, Dec 8, 2014 at 6:48 PM, Roelof Wobben rwo...@hotmail.com javascript: wrote: Hello, I follow the Agile Web development book. Now as a extra challenge I try to make the card visible on a seperate page. So I made this link : li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path % /li But now I see the above error message. When I do card_path (:id) I see a message that there is no card with the id of id. Roelof -- 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-ta...@googlegroups.com javascript:. To post to this group, send email to rubyonra...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9442f58f-58b5-475e-823d-c797431c41c3%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/9442f58f-58b5-475e-823d-c797431c41c3%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/46cea06c-0a2c-41e2-88c5-b3516c76c504%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] No route matches {:action=show, :controller=carts} missing required keys: [:id]
If you're on /cards/:id, then look at your cards_controller.rb , you'd see @card defined , hence you should use li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(@card) % /li But why would you goto to the show page ( /cards/:id/ ) when you're already on the page ? regarding the cart, You have to follow the same procedure. define @cart in the controller/action and use it like this li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(@cart) % /li If you can give more info on what you're trying to do (app structure) , We can help you a bit better :) PS: i haven't read the book Cheers Vivek On Mon, Dec 8, 2014 at 7:00 PM, Roelof Wobben rwob...@hotmail.com wrote: Hello, It's is the form of /cards/:id I tried li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(cart) % /li li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(card) % /li but on both I see this message : undefined local variable or method `cart' undefined local variable or method `card' Roelof Op maandag 8 december 2014 14:23:33 UTC+1 schreef Vivek Sampara: What is the url you're using to show this on a separate page ? if its in the pattern of /cards/:id/something then you dont have to provide the card path as rails picks up @card object to build the path or you'll have to pass the card variable inside the path method. eg % @cards.each do |card| % li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(card) % /li % end % This way, rails would know which exact card this link should take them to. On Mon, Dec 8, 2014 at 6:48 PM, Roelof Wobben rwo...@hotmail.com wrote: Hello, I follow the Agile Web development book. Now as a extra challenge I try to make the card visible on a seperate page. So I made this link : li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path % /li But now I see the above error message. When I do card_path (:id) I see a message that there is no card with the id of id. Roelof -- 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-ta...@googlegroups.com. To post to this group, send email to rubyonra...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/rubyonrails-talk/9442f58f-58b5-475e-823d- c797431c41c3%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/9442f58f-58b5-475e-823d-c797431c41c3%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/46cea06c-0a2c-41e2-88c5-b3516c76c504%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/46cea06c-0a2c-41e2-88c5-b3516c76c504%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CAFKVRj_SgMF7HEVX%3Duy1zYiFVSR87PuoowS_OhFm6Y_AFiVhpg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Re: No such file to load error
On 8 December 2014 at 11:10, Gene Dela Cruz li...@ruby-forum.com wrote: I'm getting this error in my script. Can someone help me figure out what I'm missing on my code. Thank you. Gem::LoadError: Could not find selenium-client (= 0) amongst [actionmailer-2.3.8, actionpack-2.3.8, activerecord-2.3.8, activerecord-jdbc-adapter-0.9.6-java, activerecord-jdbcmysql-adapter-0.9.6-java, activerecord-jdbcpostgresql-adapter-0.9.6-java, activeresource-2.3.8, activesupport-2.3.8, columnize-0.3.6, diff-lcs-1.1.3, jdbc-mysql-5.0.4, jdbc-postgres-8.4.702-java, linecache-0.46-java, rack-1.1.0, rails-2.3.8, rake-10.0.4, rake-10.0.3, rcov-0.8.1.5.0-java, rspec-2.13.0, rspec-core-2.13.1, rspec-expectations-2.13.0, rspec-mocks-2.13.0, ruby-debug-0.10.5.rc2, ruby-debug-base-0.10.5.rc2-java, ruby-debug-ide-0.4.17.beta14] Have you run bundle install Colin to_specs at C:/Users/gene/AppData/Roaming/NetBeans/8.0.1/jruby/lib/ruby/shared/rubygems/dependency.rb:247 to_spec at C:/Users/gene/AppData/Roaming/NetBeans/8.0.1/jruby/lib/ruby/shared/rubygems/dependency.rb:256 gem at C:/Users/gene/AppData/Roaming/NetBeans/8.0.1/jruby/lib/ruby/shared/rubygems.rb:1231 (root) at C:\Users\gene\Projects\lib\roche.rb:3 -- 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/msgid/rubyonrails-talk/6c32ceef0a654af6ff53771bf399883d%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CAL%3D0gLsXqQoka73sSy9Ot_YWMYGaGUuXaTdO4aSLNOLg8Tm0Sg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] No route matches {:action=show, :controller=carts} missing required keys: [:id]
Im at the home page and I want to make a link to /card/:id According to rake routes I have to use cart_path. The carts route looks like this : class CartsController ApplicationController before_action :set_cart, only: [:show, :edit, :update, :destroy] def index @carts = Cart.all end def show end def new @cart = Cart.new end Which uses this file : module CurrentCart extend ActiveSupport::Concern private def set_cart @cart = Cart.find(session[:cart_id]) rescue ActiveRecord::RecordNotFound @cart = Cart.create session[:cart_id] = @cart.id end end So I have to figure out how to make the id of the card avaible on the url. Roelof Op maandag 8 december 2014 14:38:20 UTC+1 schreef Vivek Sampara: If you're on /cards/:id, then look at your cards_controller.rb , you'd see @card defined , hence you should use li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(@card) % /li But why would you goto to the show page ( /cards/:id/ ) when you're already on the page ? regarding the cart, You have to follow the same procedure. define @cart in the controller/action and use it like this li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(@cart) % /li If you can give more info on what you're trying to do (app structure) , We can help you a bit better :) PS: i haven't read the book Cheers Vivek On Mon, Dec 8, 2014 at 7:00 PM, Roelof Wobben rwo...@hotmail.com javascript: wrote: Hello, It's is the form of /cards/:id I tried li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(cart) % /li li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(card) % /li but on both I see this message : undefined local variable or method `cart' undefined local variable or method `card' Roelof Op maandag 8 december 2014 14:23:33 UTC+1 schreef Vivek Sampara: What is the url you're using to show this on a separate page ? if its in the pattern of /cards/:id/something then you dont have to provide the card path as rails picks up @card object to build the path or you'll have to pass the card variable inside the path method. eg % @cards.each do |card| % li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path(card) % /li % end % This way, rails would know which exact card this link should take them to. On Mon, Dec 8, 2014 at 6:48 PM, Roelof Wobben rwo...@hotmail.com wrote: Hello, I follow the Agile Web development book. Now as a extra challenge I try to make the card visible on a seperate page. So I made this link : li%= link_to 'i class=fa fa-money/i Card'.html_safe, cart_path % /li But now I see the above error message. When I do card_path (:id) I see a message that there is no card with the id of id. Roelof -- 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-ta...@googlegroups.com. To post to this group, send email to rubyonra...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/rubyonrails-talk/9442f58f-58b5-475e-823d- c797431c41c3%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/9442f58f-58b5-475e-823d-c797431c41c3%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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-ta...@googlegroups.com javascript:. To post to this group, send email to rubyonra...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/46cea06c-0a2c-41e2-88c5-b3516c76c504%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/46cea06c-0a2c-41e2-88c5-b3516c76c504%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/7c0f7fbf-6349-4655-9962-21263fe3951e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Rails Integrate with Webrtc
I wrote this about it. http://www.toptal.com/ruby-on-rails/a-year-with-webrtc-lessons-in-startup-engineering === *Alexandre Mondaini Calvão* *Nossa recompensa se encontra no esforço e não no resultado. Um esforço total é uma vitória completa*. [Ghandi] 2014-12-08 7:54 GMT-02:00 Vivek Sampara ravensnowb...@gmail.com: I'd recommend you not to re-invent the wheel and use bbb or appear.in or talky On Mon, Dec 8, 2014 at 2:06 PM, Parth S parthisiva...@gmail.com wrote: Hi All, I need to implement video chat function in my rails application. Could anyone tell how will do that using Webrtc . -- 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/msgid/rubyonrails-talk/74065d2d-98f1-4350-95ec-7b4d9c64fb85%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/74065d2d-98f1-4350-95ec-7b4d9c64fb85%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CAFKVRj_7aYzjbrK4j3cRc-XwDBPUSoPcDxPhqi6%2Bd0ni7s%2B4yw%40mail.gmail.com https://groups.google.com/d/msgid/rubyonrails-talk/CAFKVRj_7aYzjbrK4j3cRc-XwDBPUSoPcDxPhqi6%2Bd0ni7s%2B4yw%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/msgid/rubyonrails-talk/CA%2BaBw4Qn%2Bc9Jci%3Dk6LxrR2EjSOfAHKzXvsEs1o-ZUUYSj7ne3A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Facility scheduling app for an airline
Open Campground is an app scheduling campground sites. You can take a look and download it at opencampground.com. It is rails 2.3.18 so some things have changed but the central issues are about the same. Norm On 12/08/2014 12:26 AM, Olivier R wrote: I need to create a simple application to manage the scheduling of aircrafts and its crew. Is anyone aware of a similar project (hotel, tennis court or others) which could serve as a launch pad? Thank you, Olivier RoR developer and Airline Pilot -- 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/msgid/rubyonrails-talk/5485B5C9.2030800%40earthlink.net. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] History of Ruby on Rails
Google is a terribly unhelpful tool for much journalistic and historical analysis. Part of a serious problem with the no-memory generation we are now seeing. Google and Wikipedia have been largely discredited because they lack the verifiability of primary sources (academically speaking). awhiteh...@gmail.com -- I would love to see some of your research when you have it available. As far as I can tell, the early days of Rails (2005-2010) went largely undocumented from a journalistic perspective. I think analysis of the archives of the mailing lists as well as Github pull requests would be an interesting and worthwhile endeavor. I would also try searching Lexus Nexus publications for published works that had interviews of some of the early creators of Rails. Also maybe dig through Ars Technica and some of the other specialized tech-focused bulletin boards to see if you can pull up some interesting discussions. I would also point out that one of the significant turning points in Rails history was the 2009 Rails-Merb story, itself an interesting historical narrative given light of recent developments of Node/NPM. Good luck! -Jason On Dec 6, 2014, at 2:48 PM, Dave Aronson googlegroups.2.t...@codosaur.us wrote: On Sat, Dec 6, 2014 at 1:44 PM, awhiteh...@gmail.com wrote: Is there a descent source that details the history and development of Ruby on Rails? You'll find all you ever needed to know here: http://www.lmgtfy.com?q=%22ruby+on+rails%22+history You might also find this useful, even if the author's tone is often a bit abrasive: http://www.catb.org/esr/faqs/smart-questions.html -- Dave Aronson, consulting software developer of Codosaur.us, PullRequestRoulette.com, Blog.Codosaur.us, and Dare2XL.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/msgid/rubyonrails-talk/CAHxKQihecOGs83XNEKteXTBQoKkKP2BG%3DviBw%2BJUxrRwVWSg8A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous). Email ja...@datatravels.com with questions/concerns about this. -- 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/msgid/rubyonrails-talk/6CB5991D-AA98-4730-90D5-65074D62D644%40datatravels.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Bundle Install Fails on SSL connect for Rake gem
Hello - I'm just getting started with Rails, been a ColdFusion programmer for 10+ years. I'm trying to install Rails and get set up on my local dev and it mostly worked, except at the very end of the install using RubyInstaller, I get this message about a particular Gem that can't be installed: Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake- 10.4.2.gem) An error occurred while installing rake (10.4.2), and Bundler cannot continue. Make sure that `gem install rake -v '10.4.2'` succeeds before bundling. Does anyone know how I could fix that error? I was able to go to the URL and download the gem file directly, but not sure how to install it so that the Bundle installer will see that it's been put in and finish its installation routine when I run bundle install. Any help would be very much appreciated. Thanks! Cindi -- 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/msgid/rubyonrails-talk/08700e58-3e8d-48e3-82d4-d7f990769411%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Bundle Install Fails on SSL connect for Rake gem
Cindi, 1) did you try this: http://stackoverflow.com/questions/10246023/bundle-install-fails-with-ssl-certificate-verification-error 2) Tweet @rubygems_status or @dwradcliffe if you think the problem is on their end. (but more likely is that you're using an old version of bundler as explained in the link above) -Jason On Dec 8, 2014, at 1:18 PM, Cindi cvine...@gmail.com wrote: Hello - I'm just getting started with Rails, been a ColdFusion programmer for 10+ years. I'm trying to install Rails and get set up on my local dev and it mostly worked, except at the very end of the install using RubyInstaller, I get this message about a particular Gem that can't be installed: Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake- 10.4.2.gem) An error occurred while installing rake (10.4.2), and Bundler cannot continue. Make sure that `gem install rake -v '10.4.2'` succeeds before bundling. Does anyone know how I could fix that error? I was able to go to the URL and download the gem file directly, but not sure how to install it so that the Bundle installer will see that it's been put in and finish its installation routine when I run bundle install. Any help would be very much appreciated. Thanks! Cindi -- 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 mailto:rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com mailto:rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/08700e58-3e8d-48e3-82d4-d7f990769411%40googlegroups.com https://groups.google.com/d/msgid/rubyonrails-talk/08700e58-3e8d-48e3-82d4-d7f990769411%40googlegroups.com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout. Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous). Email ja...@datatravels.com with questions/concerns about this. -- 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/msgid/rubyonrails-talk/7BD4EFF0-1CCD-49AF-B1BE-EB7F349AAA04%40datatravels.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Re: No such file to load error
I'm using windows 7. How to install that in command line? -- 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/msgid/rubyonrails-talk/7b173c31ebbaf01677ed5d14ffa45ca5%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.