Ruby on Rails Thursday, March 31, 2016

I'm using Rails5.0.0.beta3 with multiple database connection, one to postgres and one to Oracle. When I execute rake db:migrate or rake db:schema:dump, an error is generated which appears that the OEA is asking the Postgres adaptor for a listing of it's materialized views. I'm not sure if this is a AR issue or an OEA issue or maybe both? 

$ rake db:schema:dump
rake aborted!
NoMethodError: undefined method `materialized_views' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x007ff33b5a9110>
Dev/projects/Storeburst/vendor/ruby/2.3.0/bundler/gems/oracle-enhanced-3f31fcc86f06/lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb:30:in `tables'
Dev/projects/Storeburst/vendor/ruby/2.3.0/gems/activerecord-5.0.0.beta3/lib/active_record/schema_dumper.rb:37:in `dump'
Dev/projects/Storeburst/vendor/ruby/2.3.0/gems/activerecord-5.0.0.beta3/lib/active_record/schema_dumper.rb:21:in `dump'
Dev/projects/Storeburst/vendor/ruby/2.3.0/gems/activerecord-5.0.0.beta3/lib/active_record/railties/databases.rake:253:in `block (4 levels) in <top (required)>'
Dev/projects/Storeburst/vendor/ruby/2.3.0/gems/activerecord-5.0.0.beta3/lib/active_record/railties/databases.rake:252:in `open'
Dev/projects/Storeburst/vendor/ruby/2.3.0/gems/activerecord-5.0.0.beta3/lib/active_record/railties/databases.rake:252:in `block (3 levels) in <top (required)>'
.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:schema:dump


If I comment out the OEA in the Gemfile, the db:migrate and db:schema:dump work as expected. 

jml
 

--
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+unsubscribe@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/baa8a4da-fd78-49bc-9818-e8439d23b43a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 31 March 2016 at 17:39, Vivek Babu <lists@ruby-forum.com> wrote:
> I am getting the following error in production environment
>
> "PG::DupliacatePstatement: Error: prepared statement already exists"

Show us the lines of code that cause the problem.

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+unsubscribe@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%3D0gLt7WrQjRh70Yg8vkaaLCCYsc4%2B8p0Kd4LjoB7gF3r0Hmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am getting the following error in production environment

"PG::DupliacatePstatement: Error: prepared statement already exists"

Ruby version is 2.2.4 and
Rails version is 4.1.3

I have the following code in my unicorn.rb file:

before_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn master intercepting TERM and sending myself QUIT
instead'
Process.kill 'QUIT', Process.pid
end

defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
end

after_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn worker intercepting TERM and doing nothing. Wait
for master to send QUIT'
end

defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection
end

I have added

prepared_statement: false

in database.yml file. In environments/production.rb file, I have

config.cache_classes = false
config.action_controller.perform_caching = false

Can anyone please suggest a solution for this error?


[1]: http://i.stack.imgur.com/Qzm7Z.jpg

Attachments:
http://www.ruby-forum.com/attachment/11326/fd35c989-0aca-488b-b57d-82ec642ae206.jpg


--
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+unsubscribe@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/d48c0f8a589d3c89a862600a0e1a0cc3%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 31 March 2016 at 10:05, Naveed Alam <lists@ruby-forum.com> wrote:
>> It depends on whether that is ever supposed to be nil. If it is then
>> you just need to test for that in your code before using it.
>>
>> Colin
>
>
> In my controller's edit_privilege method I changed the below line
>
> from
> @user = User.active.first(:conditions => ["username LIKE
> BINARY(?)",params[:id]])
> to
> @user = User.active.find_by_username(params[:id])
>
> and it solved the problem. but dont know why not the above line working?

I would not have expected either to work, as I would have expected
params[:id] to contain the id of the user not the name. What is in
params[:id]?

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+unsubscribe@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%3D0gLuKSoGCtZeEWFR84n11dUB%3D%3DzPKygu1ktdj0ioyHdKiNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> It depends on whether that is ever supposed to be nil. If it is then
> you just need to test for that in your code before using it.
>
> Colin


In my controller's edit_privilege method I changed the below line

from
@user = User.active.first(:conditions => ["username LIKE
BINARY(?)",params[:id]])
to
@user = User.active.find_by_username(params[:id])

and it solved the problem. but dont know why not the above line working?


def edit_privilege
@user = User.active.find_by_username(params[:id])
#User.active.first(:conditions => ["username LIKE
BINARY(?)",params[:id]])
@employee = @user.employee_record
@privilege_tags=PrivilegeTag.find(:all,:order=>"priority ASC")
@user_privileges=@user.privileges
if request.post?
new_privileges = params[:user][:privilege_ids] if params[:user]
new_privileges ||= []
@user.privileges = Privilege.find_all_by_id(new_privileges)
redirect_to :action => 'admission4',:id => @employee.id
end
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@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/65370b55dd3db2d399151af5e58f6f9a%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, March 30, 2016

On 30 March 2016 at 19:15, Aman Aman <lists@ruby-forum.com> wrote:
> Thanks http solved the issue

I should have noticed that earlier.

By the way, in future could you please remember to quote the previous
message when replying, it makes it easier to follow the thread. This
is a mailing list not a forum (though you may be accessing it via a
forum-like interface. Thanks.

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+unsubscribe@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%3D0gLv_F28LreTgDkxiMtHt085h2B8zGHhXH8NSxy_t0P6k0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Thanks http solved the 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@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/6e5b186bd7a4f7524b431e9354fc5b38%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, March 29, 2016

On 27 March 2016 at 16:32, Aman Aman <lists@ruby-forum.com> wrote:
>
> Welcome to the Ama's Website! Click on the link below to activate your
> account:
>
> https://localhost:3000/account_activations/pkYUYrlBZPPqz82hSPyMSQ/edit?email=siteshranjan39%40gmail.com

What happens if you try it with http rather than https?

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+unsubscribe@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%3D0gLtB4zRa2efjc-FX13hSro-WzzGG5kV7QJfy%2BRu0jQnMYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Colin Law wrote in post #1182498:

> What happens if you copy/paste the url from the email into the browser
> address bar?
>
> If that still gives the same error what happens if you re-type it into
> the address bar (boring I know but please try it).
>
> Colin

Yes it's giving same error

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

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@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/946ceb01f86754cf4ced51dfde79a768%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Monday, March 28, 2016

It's easier to see changes when I'm at 100%.  What I'm trying to do is analogous to configuring Rubocop and Rails Best Practices to ignore certain violations.  (Given how nitpicky these tools can be, some violations may not be worth correcting.)

On Sunday, March 27, 2016 at 12:46:51 AM UTC-5, tamouse wrote:

You've just slipped off the edge of using metrics to meaningfully improve your testing to gaming the metric collection to meaninglessly improve a metric.

--
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+unsubscribe@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/28ed3881-5ff5-4204-9ecf-5edae4e42b7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

This post will take you through adding text chat functionality using Opentok (a WebRTC platform) in Ruby on Rails. OpenTok is a WebRTC platform for embedding live video, voice, and messaging into your websites and mobile apps. Opentok has its own signalling server. We will be using the OpenTok signaling API.

--
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+unsubscribe@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/1074577d-8604-40c6-ba31-6cbd879908ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, March 27, 2016

On 27 March 2016 at 17:45, Aman Aman <lists@ruby-forum.com> wrote:
> Colin Law wrote in post #1182496:
>> On 27 March 2016 at 16:32, Aman Aman <lists@ruby-forum.com> wrote:
>>> I have attached some of my files for user activation mail. You can check
>>> it.
>>> and here is what I get on development log file when I signup a new user.
>>> and the mail in development log file.
>>
>> It is not good just posting a big chunk of code and logs, you need to
>> find the bit that is failing and explain the problem clearly. You
>> have not even said here what the problem is.
>>
>> Colin
>
> The Problem is that when I register new user I gets the mail in
> development log file and I can also see the generated mail in server
> console. But when I enter the activation url from the mail it does not
> opens and I get the error bad request line in the server console Like.

What happens if you copy/paste the url from the email into the browser
address bar?

If that still gives the same error what happens if you re-type it into
the address bar (boring I know but please try it).

Colin

>> [2016-03-24 22:37:58] ERROR bad Request-Line
>> `\x16\x03\x03\x00?\x01\x00\x00?\x03
>> \x03V?\x1E?\x11?\x04?M??y?b????yGl?\x03S\x11?\x00?\x10E?`\x00\x008?0?/?(?'?\x14?
>> \x13\x00?\x00?\x00?\x00?\x00=\x00<\x005\x00/?,?+?$?#?'.
>> [2016-03-24 22:37:58] ERROR bad Request-Line
>> `\x16\x03\x01\x00}\x01\x00\x00y\x03
>> \x01V?\x1E??-O??'aY?R?GZ;?g^9F??E?\x1Ct?\x00\x00\x18?\x14?\x13\x005\x00/?'.
>
> I don't know why. Is it ssl error ? I am working on localhost .
>
> --
> 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+unsubscribe@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/fe2f647f61074c649316b11c46bff694%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+unsubscribe@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%3D0gLtJ6YLSvXGFsjT%3Dnts%3DaD%2Bt2T%3DKVi5ev75bXQxxTMJ53g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Colin Law wrote in post #1182496:
> On 27 March 2016 at 16:32, Aman Aman <lists@ruby-forum.com> wrote:
>> I have attached some of my files for user activation mail. You can check
>> it.
>> and here is what I get on development log file when I signup a new user.
>> and the mail in development log file.
>
> It is not good just posting a big chunk of code and logs, you need to
> find the bit that is failing and explain the problem clearly. You
> have not even said here what the problem is.
>
> Colin

The Problem is that when I register new user I gets the mail in
development log file and I can also see the generated mail in server
console. But when I enter the activation url from the mail it does not
opens and I get the error bad request line in the server console Like.
> [2016-03-24 22:37:58] ERROR bad Request-Line
> `\x16\x03\x03\x00?\x01\x00\x00?\x03
> \x03V?\x1E?\x11?\x04?M??y?b????yGl?\x03S\x11?\x00?\x10E?`\x00\x008?0?/?(?'?\x14?
> \x13\x00?\x00?\x00?\x00?\x00=\x00<\x005\x00/?,?+?$?#?'.
> [2016-03-24 22:37:58] ERROR bad Request-Line
> `\x16\x03\x01\x00}\x01\x00\x00y\x03
> \x01V?\x1E??-O??'aY?R?GZ;?g^9F??E?\x1Ct?\x00\x00\x18?\x14?\x13\x005\x00/?'.

I don't know why. Is it ssl error ? I am working on localhost .

--
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+unsubscribe@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/fe2f647f61074c649316b11c46bff694%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 27 March 2016 at 16:32, Aman Aman <lists@ruby-forum.com> wrote:
> I have attached some of my files for user activation mail. You can check
> it.
> and here is what I get on development log file when I signup a new user.
> and the mail in development log file.

It is not good just posting a big chunk of code and logs, you need to
find the bit that is failing and explain the problem clearly. You
have not even said here 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+unsubscribe@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%3D0gLu1c3ph1F3x0buu05HS50yXu9FGRwMOqHBAEnfAgiC3Cw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I have attached some of my files for user activation mail. You can check
it.
and here is what I get on development log file when I signup a new user.
and the mail in development log file.

Started POST "/users" for ::1 at 2016-03-27 20:37:31 +0530
Processing by UsersController#create as HTML
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"k37x/FEjLGKxkSbAMlH1zt3QLze/gQCXHrwk0bXtlFPoF/mbduoI4gQ4H7bhZOhD+jw2375EpMzqy6IeeifmHQ==",
"user"=>{"name"=>"testing", "email"=>"siteshranjan39@gmail.com",
"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"},
"commit"=>"Create my account"}
[1m[35m (1.0ms)[0m BEGIN
[1m[36mUser Exists (36.6ms)[0m [1mSELECT 1 AS one FROM `users` WHERE
`users`.`email` = 'siteshranjan39@gmail.com' LIMIT 1[0m
[1m[35mSQL (111.8ms)[0m INSERT INTO `users` (`name`, `email`,
`password_digest`, `created_at`, `updated_at`, `activation_digest`)
VALUES ('testing', 'siteshranjan39@gmail.com',
'$2a$10$0Q8teDUvinfjI3y.df4lwuDKcT1DiKUHmxk.VX0Iz8LPaANI4VVvy',
'2016-03-27 15:07:32', '2016-03-27 15:07:32',
'$2a$10$FQI1PtuYiq7UOFK8WVsUnuZ2lUS5gR04LC.dqQ8ILW5QIHdZzRJtq')
[1m[36m (32.3ms)[0m [1mCOMMIT[0m
Rendered user_mailer/account_activation.html.erb within layouts/mailer
(2.0ms)
Rendered user_mailer/account_activation.text.erb within layouts/mailer
(0.0ms)

UserMailer#account_activation: processed outbound mail in 315.2ms

Sent mail to siteshranjan39@gmail.com (340.5ms)
Date: Sun, 27 Mar 2016 20:37:33 +0530
From: amanprince28@gmail.com
To: siteshranjan39@gmail.com
Message-ID: <56f7f7366091_2668335a2582025e@DESKTOP-A70NEJG.mail>
Subject: Account activation
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_56f7f735c4e0f_2668335a258201e4";
charset=UTF-8
Content-Transfer-Encoding: 7bit


----==_mimepart_56f7f735c4e0f_2668335a258201e4
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi testing,

Welcome to the Ama's Website! Click on the link below to activate your
account:

https://localhost:3000/account_activations/pkYUYrlBZPPqz82hSPyMSQ/edit?email=siteshranjan39%40gmail.com


----==_mimepart_56f7f735c4e0f_2668335a258201e4
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit

<html>
<body>
<h1>Aman website</h1>

<p>Hi testing,</p>

<p>
Welcome to the Aman's website! Click on the link below to activate
your account:
</p>

<a
href="https://localhost:3000/account_activations/pkYUYrlBZPPqz82hSPyMSQ/edit?email=siteshranjan39%40gmail.com">Activate</a>


</body>
</html>

----==_mimepart_56f7f735c4e0f_2668335a258201e4--

Redirected to http://localhost:3000/
Completed 302 Found in 2635ms (ActiveRecord: 181.6ms)


Started GET "/" for ::1 at 2016-03-27 20:37:34 +0530
Processing by SitePagesController#home as HTML
Rendered site_pages/home.html.erb within layouts/application (2.0ms)
Rendered layouts/_menubar.html.erb (4.0ms)
Rendered layouts/_footer.html.erb (1.0ms)
Completed 200 OK in 285ms (Views: 284.6ms | ActiveRecord: 0.0ms)


Started GET "/login" for ::1 at 2016-03-27 20:57:05 +0530
Processing by LoginController#new as HTML
Rendered login/new.html.erb within layouts/application (2847.2ms)
Rendered layouts/_menubar.html.erb (69.8ms)
Rendered layouts/_footer.html.erb (1.0ms)
Completed 200 OK in 7874ms (Views: 7721.3ms | ActiveRecord: 0.0ms)


And I am entering this url for activation
https://localhost:3000/account_activations/pkYUYrlBZPPqz82hSPyMSQ/edit?email=siteshranjan39%40gmail.com

Attachments:
http://www.ruby-forum.com/attachment/11315/account_activations_controller.rb
http://www.ruby-forum.com/attachment/11316/users_controller.rb
http://www.ruby-forum.com/attachment/11317/application_controller.rb
http://www.ruby-forum.com/attachment/11318/application_mailer.rb
http://www.ruby-forum.com/attachment/11319/user_mailer.rb
http://www.ruby-forum.com/attachment/11320/account_activation.html.erb


--
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+unsubscribe@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/0e94ffcbeab6f0b2c0781385ce9b744f%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Comentario:
Vi por toda internet los tutoriales que dicen bajen esto para windows un
paquete de la pagina railinstaller donde bajas un paquete y
supuestamente
con eso ya tenemos ruby and rails con todo lo necesario, pero la
sorpresa fue mayuscula cuando me di cuenta que eso no es todo; ni está
lejos de acabar. no instala rails, si instala ruby. y por todo internet
te dicen que para windows es el clasico siguiente siguiente y nada
que ver hay que meter manos a la consola para instalar las gemas. y ahi
si ya podes tener rails.

Las gemas las instalé sin conexion a internet tal como dice en la pagina
de las gemas.

Pregunto:
Tengo que estar todo el tiempo conectado a internet? digo porque
siguiendo el tutorial para aprender ruby on rails al crear la app trata
de conectarse a internet para bajar no se que cosa solo se queda un
largo rato bundle install y despues me manda error de conexion.

por favor si alguien la tiene clara. quisiera saber si se puede estar
sin internet ya que no tengo internet tengo que ir a un ciber-cafe para
poder buscar info y si ruby on rails es un lenguaje de programacion
internet-dependiente entonces me tendré que despedir.

Espero me iluminen.

--
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+unsubscribe@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/6a0ad5490f85dc48b1c5025ad6e8b4e8%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On Mar 26, 2016, at 11:36 PM, tamouse pontiki <tamouse.lists@gmail.com> wrote:
>
>
>
> On Sat, Mar 26, 2016 at 4:35 AM, Colin Law <clanlaw@gmail.com> wrote:
> On 26 March 2016 at 09:25, Naveed Alam <lists@ruby-forum.com> wrote:
> > Ramu Goud wrote in post #1182441:
> >> Hi,
> >> i have column name phone with integer datatype but when i enter phone
> >> number it throws an error
> >> "1325565488 is out of range for ActiveRecord::Type::Integer with limit
> >> 4"
> >
> > goto your db folder and in the migration change the phone number field
> > data type from integer to string. and thats all. but u will will to do
> > rake db:migrate
> > after that.
>
> It is best to add a new migration to do this.
>
> Colin
>
> ((this is what I tried to send))
>
> Agreed. If you change an old migration, and run `rake db:migrate` *NOTHING* will happen, because that migration is already saved in the database table 'schema_migrations'. You either need to create a new migration, or you have to drop the data base and re-run all the migrations.
>
> I once tried to circumvent this in a panic situation by deleting the schema migration record and re-running the migration, but it was such a crazy thing to try, I gave up.
>
> My advice is to do just as Colin suggested, and use a *new* migration to change the table.

It's helpful to think of migrations as "version control for your database". They capture the steps along the way to where you are now (the schema.rb is the current state, or HEAD, of your migrations).

Walter

>
> --
> 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+unsubscribe@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/CAHUC_t8cNyiPPnyp%2B6jceSFCS%2BOBgT1L%3Dw5fDKJSUe9E4XKDMA%40mail.gmail.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+unsubscribe@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/25AD37B8-47D1-49CD-A1A1-D8097F13570F%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Saturday, March 26, 2016


On Sat, Mar 26, 2016 at 11:11 PM, Jason Hsu, Ruby on High Speed Rails <jhsu802701@gmail.com> wrote:
My project at https://github.com/jhsu802701/losemoneyfast is rated at 98.7% test coverage.  I'm getting dinged for config/initializers/rack_profiler.rb .

Is there something I can do to fix this or to get the CodeClimate engine to skip this file in its test coverage analysis?

You've just slipped off the edge of using metrics to meaningfully improve your testing to gaming the metric collection to meaninglessly improve a metric.



--
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+unsubscribe@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/CAHUC_t8VULE2QkJk9DgL8xjUMnFXGOavVc6bzFhNJS%2B4mJK-xA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

My project at https://github.com/jhsu802701/losemoneyfast is rated at 98.7% test coverage.  I'm getting dinged for config/initializers/rack_profiler.rb .

Is there something I can do to fix this or to get the CodeClimate engine to skip this file in its test coverage analysis?

--
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+unsubscribe@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/1c95775c-4aab-4d83-8a2e-d07c1637609a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Sat, Mar 26, 2016 at 4:35 AM, Colin Law <clanlaw@gmail.com> wrote:
On 26 March 2016 at 09:25, Naveed Alam <lists@ruby-forum.com> wrote:
> Ramu Goud wrote in post #1182441:
>> Hi,
>> i have column name phone with integer datatype but when i enter phone
>> number it throws an error
>> "1325565488 is out of range for ActiveRecord::Type::Integer with limit
>> 4"
>
> goto your db folder and in the migration change the phone number field
> data type from integer to string. and thats all. but u will will to do
> rake db:migrate
> after that.

It is best to add a new migration to do this.

Colin

((this is what I tried to send))

Agreed. If you change an old migration, and run `rake db:migrate` *NOTHING* will happen, because that migration is already saved in the database table 'schema_migrations'. You either need to create a new migration, or you have to drop the data base and re-run all the migrations.

I once tried to circumvent this in a panic situation by deleting the schema migration record and re-running the migration, but it was such a crazy thing to try, I gave up.

My advice is to do just as Colin suggested, and use a *new* migration to change the table. 

--
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+unsubscribe@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/CAHUC_t8cNyiPPnyp%2B6jceSFCS%2BOBgT1L%3Dw5fDKJSUe9E4XKDMA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 26 March 2016 at 14:37, tamouse pontiki <tamouse.lists@gmail.com> wrote:
> Sorry if this was duplicated -- I was trying to use Apple Mail again after
> all these years and suddenly remembered why I wasn't using it.

Hi Tamouse, I don't think we received it once, let alone twice. At
least I did not see it.

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+unsubscribe@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%3D0gLtgQ-ShmsabVaUgh8qbiNvLasMAcKopgqCOcJ7EKfxjYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Sorry if this was duplicated -- I was trying to use Apple Mail again after all these years and suddenly remembered why I wasn't using it.


On Sat, Mar 26, 2016 at 9:34 AM, tamouse pontiki <tamouse.lists@gmail.com> wrote:


--
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+unsubscribe@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/CAHUC_t_b_vfPMu%2BTPs0sXdANMvu4Rxidnm2PkF7t9b%2BLJyi7nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I just saw this the other day. I haven't tried it yet, but it looks really simple and straightforward: http://blog.nrowegt.com/quickly-create-a-self-referential-versioning-system-for-ruby-on-rails/

Walter

> On Mar 26, 2016, at 10:30 AM, Hassan Schroeder <hassan.schroeder@gmail.com> wrote:
>
> On Sat, Mar 26, 2016 at 5:07 AM, Martin <mylists@kaffanke.at> wrote:
>
>> for version control of models I found that here:
>> https://github.com/technoweenie/acts_as_versioned
>>
>> Its last updated 4 years ago, so I wonder if there isn't a newer package
>> for that for rails 4 ?
>
> Perhaps you can find something appropriate here:
>
> https://www.ruby-toolbox.com/categories/Active_Record_Versioning
>
> HTH,
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
> Consulting Availability : Silicon Valley or remote
>
> --
> 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+unsubscribe@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/CACmC4yAGRgFs_xONhophkgN2A1cLu-jV8KEUXG5X8a%2BSX%3Dh2Cg%40mail.gmail.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+unsubscribe@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/8BCB58F2-6630-4423-B56F-DE32393AC002%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Sat, Mar 26, 2016 at 5:07 AM, Martin <mylists@kaffanke.at> wrote:

> for version control of models I found that here:
> https://github.com/technoweenie/acts_as_versioned
>
> Its last updated 4 years ago, so I wonder if there isn't a newer package
> for that for rails 4 ?

Perhaps you can find something appropriate here:

https://www.ruby-toolbox.com/categories/Active_Record_Versioning

HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
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+unsubscribe@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/CACmC4yAGRgFs_xONhophkgN2A1cLu-jV8KEUXG5X8a%2BSX%3Dh2Cg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi there,

for version control of models I found that here:
https://github.com/technoweenie/acts_as_versioned

Its last updated 4 years ago, so I wonder if there isn't a newer package
for that for rails 4 ?

Background: I would like to do a review on changed articles, so if the
article is public and the creator changes it, I would like to have the
original online until the review is done, then the new version should go
online.

Thanks for your help,
Martin


--
Lösungen statt Diagnosen

--
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+unsubscribe@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/87io095tos.fsf%40kaffanke.at.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 26 March 2016 at 11:13, Naveed Alam <lists@ruby-forum.com> wrote:
>>
>> So Authorization::Engine.instance.roles_plugin_hash is nil.
>>
>> Colin
>
> No idea what to do

It depends on whether that is ever supposed to be nil. If it is then
you just need to test for that in your code before using it.

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+unsubscribe@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%3D0gLsjaJqME-qqpbStJPNN2gN%2BYCYU2n4e5z_qRN2GO03EHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

>
> So Authorization::Engine.instance.roles_plugin_hash is nil.
>
> Colin

No idea what to do

--
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+unsubscribe@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/eeb338b68a0fb77750fa32225a14b620%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 26 March 2016 at 10:15, Naveed Alam <lists@ruby-forum.com> wrote:
> Colin
>
> Sorry below is line 24
>
> role_plugin_hash =
> Authorization::Engine.instance.roles_plugin_hash[self.name.underscore.to_sym]

So Authorization::Engine.instance.roles_plugin_hash is nil.

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+unsubscribe@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%3D0gLs4VjszeCqoTvuzz7T-2fXHOmgsdDLP%2B-V8%3DyhiUTQgQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Colin

Sorry below is line 24

role_plugin_hash =
Authorization::Engine.instance.roles_plugin_hash[self.name.underscore.to_sym]

--
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+unsubscribe@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/36928fed09b139f2b76d922893dd4f67%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 26 March 2016 at 09:55, Naveed Alam <lists@ruby-forum.com> wrote:
> Colin Law wrote in post #1182464:
>> On 26 March 2016 at 09:30, Naveed Alam <lists@ruby-forum.com> wrote:
>>> You might have expected an instance of ActiveRecord::Base.
>>> The error occurred while evaluating nil.[]
>>>
>>> app/models/privilege.rb:24:in `applicable?'
>>
>> The error says you have called the method [] on an object that is nil.
>> You don't seem to have shown us line 24 of privilege.rb (and the
>> surrounding lines).
>>
>> Colin
>
> class Privilege < ActiveRecord::Base
> has_and_belongs_to_many :users
> belongs_to :privilege_tag
>
> def applicable?
> role_plugin_hash =
> Authorization::Engine.instance.roles_plugin_hash[self.name.underscore.to_sym]

You have not told us which is line 24, but I assume it is the one
above, in which case roles_plugin_hash is nil.

> role_plugin_hash.nil? ? false : (role_plugin_hash.include? nil) ?
> true : (role_plugin_hash & FedenaPlugin.accessible_plugins).present? ?
> true : false

That is horrible. A classic case of saving a few lines of code and
making it difficult to understand what the code is doing. I just hope
your automated tests check all the possible conditions on this.

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+unsubscribe@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%3D0gLu2kV%3DVK0d7uQE%3Dgfq7vsiYhUpYSKdtVfG67YZo3C5whQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Colin Law wrote in post #1182464:
> On 26 March 2016 at 09:30, Naveed Alam <lists@ruby-forum.com> wrote:
>> You might have expected an instance of ActiveRecord::Base.
>> The error occurred while evaluating nil.[]
>>
>> app/models/privilege.rb:24:in `applicable?'
>
> The error says you have called the method [] on an object that is nil.
> You don't seem to have shown us line 24 of privilege.rb (and the
> surrounding lines).
>
> Colin

class Privilege < ActiveRecord::Base
has_and_belongs_to_many :users
belongs_to :privilege_tag

def applicable?
role_plugin_hash =
Authorization::Engine.instance.roles_plugin_hash[self.name.underscore.to_sym]
role_plugin_hash.nil? ? false : (role_plugin_hash.include? nil) ?
true : (role_plugin_hash & FedenaPlugin.accessible_plugins).present? ?
true : false
end
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@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/04a2942c34a60793638634e1982e9e86%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 26 March 2016 at 09:30, Naveed Alam <lists@ruby-forum.com> wrote:
> Dear friends,
>
> I get the following error when I goto the privilege page.
>
> NoMethodError in Employee#edit_privilege
>
> Showing app/views/employee/edit_privilege.html.erb where line #82
> raised:
>
> You have a nil object when you didn't expect it!
> You might have expected an instance of ActiveRecord::Base.
> The error occurred while evaluating nil.[]
>
> app/models/privilege.rb:24:in `applicable?'

The error says you have called the method [] on an object that is nil.
You don't seem to have shown us line 24 of privilege.rb (and the
surrounding lines).

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+unsubscribe@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%3D0gLtm50eZmD%2BuBkyDic8r9zXBZhtAFm1REW0f0mD5qqpi7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 26 March 2016 at 09:25, Naveed Alam <lists@ruby-forum.com> wrote:
> Ramu Goud wrote in post #1182441:
>> Hi,
>> i have column name phone with integer datatype but when i enter phone
>> number it throws an error
>> "1325565488 is out of range for ActiveRecord::Type::Integer with limit
>> 4"
>
> goto your db folder and in the migration change the phone number field
> data type from integer to string. and thats all. but u will will to do
> rake db:migrate
> after that.

It is best to add a new migration to do this.

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+unsubscribe@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%3D0gLv64QYK3z3oR5%2BjZtXMAHvm7fu3qU4mF2XvZ3M7z8A8Wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Dear friends,

I get the following error when I goto the privilege page.

NoMethodError in Employee#edit_privilege

Showing app/views/employee/edit_privilege.html.erb where line #82
raised:

You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
Extracted source (around line #82):

79: <table width="100%" align="center" cellspacing="1"
cellpadding="1" class="table_design">
80: <tr>
81: <% @privilege_tags.each_with_index do
|privilege_tag,ind| %>
82: <% all_privileges =
privilege_tag.privileges.all(:conditions=>"name<>'FinanceControl'",:order=>"priority
ASC").select{|p| p.applicable?} %>
83: <% if all_privileges.count > 0 %>
84: <% if ind==0 or ind==1 or ind==4 %>
85: <td>



The development log is below:

Processing EmployeeController#edit_privilege (for 127.0.0.1 at
2016-03-26 13:49:00) [GET]
Parameters: {"action"=>"edit_privilege", "controller"=>"employee",
"id"=>"emp-0002"}
[4;35;1mUser Load (1.0ms)[0m [0mSELECT * FROM `users` WHERE
(`users`.`id` = 1) AND (`users`.`is_deleted` = 0) [0m
[4;36;1mConfiguration Load (1.0ms)[0m [0;1mSELECT * FROM
`configurations` WHERE (`configurations`.`config_key` = 'Locale') LIMIT
1[0m
[4;35;1mConfiguration Load (1.0ms)[0m [0mSELECT * FROM
`configurations` WHERE (`configurations`.`config_key` =
'InstitutionType') LIMIT 1[0m
Expired fragment: views/News_latest_fragment (0.0ms)
[4;36;1mCACHE (0.0ms)[0m [0;1mSELECT * FROM `users` WHERE
(`users`.`id` = 1) AND (`users`.`is_deleted` = 0) [0m
Username : admin Role : Admin
[4;35;1mConfiguration Load (0.0ms)[0m [0mSELECT * FROM
`configurations` WHERE (`configurations`.`config_key` =
'StudentAttendanceType') LIMIT 1[0m
[4;36;1mConfiguration Load (0.0ms)[0m [0;1mSELECT * FROM
`configurations` WHERE (`configurations`.`config_key` =
'AvailableModules') [0m
[4;35;1mUser Load (0.0ms)[0m [0mSELECT * FROM `users` WHERE
(`users`.`id` = 1) [0m
[4;36;1mConfiguration Load (1.0ms)[0m [0;1mSELECT * FROM
`configurations` WHERE (`configurations`.`config_key` =
'FirstTimeLoginEnable') LIMIT 1[0m
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `users` WHERE
(`users`.`id` = 1) AND (`users`.`is_deleted` = 0) [0m
[4;36;1mConfiguration Load (1.0ms)[0m [0;1mSELECT * FROM
`configurations` WHERE (`configurations`.`config_value` = 'HR') LIMIT
1[0m
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `users` WHERE
(`users`.`id` = 1) AND (`users`.`is_deleted` = 0) [0m
[4;36;1mPrivilege Load (0.0ms)[0m [0;1mSELECT * FROM `privileges`
INNER JOIN `privileges_users` ON `privileges`.id =
`privileges_users`.privilege_id WHERE (`privileges_users`.user_id = 1 )
[0m
[4;35;1mConfiguration Load (1.0ms)[0m [0mSELECT * FROM
`configurations` WHERE (`configurations`.`config_key` =
'PrecisionCount') LIMIT 1[0m
[4;36;1mUser Load (1.0ms)[0m [0;1mSELECT * FROM `users` WHERE
(username LIKE BINARY('emp-0002')) AND (`users`.`is_deleted` = 0) LIMIT
1[0m
[4;35;1mEmployee Load (1.0ms)[0m [0mSELECT * FROM `employees` WHERE
(`employees`.user_id = 4) LIMIT 1[0m
[4;36;1mConfiguration Load (1.0ms)[0m [0;1mSELECT * FROM
`configurations` WHERE (`configurations`.`config_value` = 'Finance')
LIMIT 1[0m
[4;35;1mSmsSetting Columns (2.0ms)[0m [0mSHOW FIELDS FROM
`sms_settings`[0m
[4;36;1mSmsSetting Load (0.0ms)[0m [0;1mSELECT * FROM `sms_settings`
WHERE (`sms_settings`.`settings_key` = 'ApplicationEnabled') LIMIT 1[0m
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `configurations` WHERE
(`configurations`.`config_value` = 'HR') LIMIT 1[0m
[4;36;1mPrivilegeTag Load (0.0ms)[0m [0;1mSELECT * FROM
`privilege_tags` ORDER BY priority ASC[0m
Rendering template within layouts/application
Rendering employee/edit_privilege
[4;35;1mEmployee Columns (3.0ms)[0m [0mSHOW FIELDS FROM
`employees`[0m
[4;36;1mCACHE (0.0ms)[0m [0;1mSELECT * FROM `users` WHERE
(`users`.`id` = 1) AND (`users`.`is_deleted` = 0) [0m
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `privileges` INNER JOIN
`privileges_users` ON `privileges`.id = `privileges_users`.privilege_id
WHERE (`privileges_users`.user_id = 1 ) [0m
[4;36;1mCACHE (0.0ms)[0m [0;1mSELECT * FROM `users` WHERE
(`users`.`id` = 1) AND (`users`.`is_deleted` = 0) [0m
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `privileges` INNER JOIN
`privileges_users` ON `privileges`.id = `privileges_users`.privilege_id
WHERE (`privileges_users`.user_id = 1 ) [0m
[4;36;1mCACHE (0.0ms)[0m [0;1mSELECT * FROM `users` WHERE
(`users`.`id` = 1) AND (`users`.`is_deleted` = 0) [0m
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `privileges` INNER JOIN
`privileges_users` ON `privileges`.id = `privileges_users`.privilege_id
WHERE (`privileges_users`.user_id = 1 ) [0m
[4;36;1mPrivilegeTag Columns (1.0ms)[0m [0;1mSHOW FIELDS FROM
`privilege_tags`[0m
[4;35;1mPrivilege Load (0.0ms)[0m [0mSELECT * FROM `privileges`
WHERE (name<>'FinanceControl') AND (`privileges`.privilege_tag_id = 2)
ORDER BY priority ASC[0m
[4;36;1mPrivilege Columns (2.0ms)[0m [0;1mSHOW FIELDS FROM
`privileges`[0m

ActionView::TemplateError (You have a nil object when you didn't expect
it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]) on line #82 of
app/views/employee/edit_privilege.html.erb:
79: <table width="100%" align="center" cellspacing="1"
cellpadding="1" class="table_design">
80: <tr>
81: <% @privilege_tags.each_with_index do
|privilege_tag,ind| %>
82: <% all_privileges =
privilege_tag.privileges.all(:conditions=>"name<>'FinanceControl'",:order=>"priority
ASC").select{|p| p.applicable?} %>
83: <% if all_privileges.count > 0 %>
84: <% if ind==0 or ind==1 or ind==4 %>
85: <td>

app/models/privilege.rb:24:in `applicable?'
app/views/employee/edit_privilege.html.erb:82
app/views/employee/edit_privilege.html.erb:82:in `select'
app/views/employee/edit_privilege.html.erb:82
C:/Ruby187/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:42:in
`each_with_index'
app/views/employee/edit_privilege.html.erb:81:in `each'
app/views/employee/edit_privilege.html.erb:81:in `each_with_index'
app/views/employee/edit_privilege.html.erb:81
app/views/employee/edit_privilege.html.erb:71
app/controllers/application_controller.rb:361:in `render'

Rendered rescues/_trace (198.0ms)
Rendered rescues/_request_and_response (1.0ms)
Rendering rescues/layout (internal_server_error)



and my users table has the following record.

username: emp-0002
first_name: Adam
password: xxxxxxxx
etc.

can any one help me pls what this error means or what is it asking from
me.

--
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+unsubscribe@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/6b9981c138b038d6e301673097923f7f%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Ramu Goud wrote in post #1182441:
> Hi,
> i have column name phone with integer datatype but when i enter phone
> number it throws an error
> "1325565488 is out of range for ActiveRecord::Type::Integer with limit
> 4"

goto your db folder and in the migration change the phone number field
data type from integer to string. and thats all. but u will will to do
rake db:migrate
after that.

--
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+unsubscribe@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/267322f1b9b5fb58817f85582e4463d3%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Friday, March 25, 2016

Check out my new web site Ruby on Racetracks at http://www.rubyonracetracks.com . On this site, I have described the use of tools like Docker, GenericGem, and GenericApp for getting more done in less time while improving quality. If you find the conventional procedures to be too time-consuming and error-prone, then this is the site for you.

--
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+unsubscribe@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/2f2fba4d-e0e4-4dbf-9c6f-9e9354595a2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Colin Law wrote in post #1182302:
> On 18 Mar 2016 21:15, "David Williams" <lists@ruby-forum.com> wrote:


I fixed the issue, clashing CSS classes was causing bootstrap to move
child objects on the grid.

--
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+unsubscribe@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/8b154620d5b0e7504a3064f031ae47d9%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, March 24, 2016

Use a string data type for the number.

--Rob
Sent from my cell, please excuse any typos.

On Mar 24, 2016 5:55 PM, "Ramu Goud" <lists@ruby-forum.com> wrote:
Use string where???? i'm just a beginner so can u tell me that in detail

--
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+unsubscribe@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/6fd7d7f749663e95ecce4271909fa3cf%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+unsubscribe@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/CAPncwvJAWMsrFxxQikkviH4Rbh%2B3Yw8nazaMdoYwWP2eb6Vdmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 24 March 2016 at 21:54, Ramu Goud <lists@ruby-forum.com> wrote:
> Use string where???? i'm just a beginner so can u tell me that in detail

As the datatype for the column in the database.

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+unsubscribe@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%3D0gLvvxTK7a%3D_TYwAjhDiuw1NVmH2HPzKdmsvjaz-txjEuSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Use string where???? i'm just a beginner so can u tell me that in detail

--
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+unsubscribe@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/6fd7d7f749663e95ecce4271909fa3cf%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Use a string.

--Rob
Sent from my cell, please excuse any typos.

On Mar 24, 2016 5:49 PM, "Ramu Goud" <lists@ruby-forum.com> wrote:
Hi,
i have column name phone with integer datatype but when i enter phone
number it throws an error
"1325565488 is out of range for ActiveRecord::Type::Integer with limit
4"

i have changed limit to 8 in migration file but still it didn't work.

Any kind suggestions would be appreciated. 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+unsubscribe@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/ffb4a1a1018546058e1a326469ef73b8%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+unsubscribe@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/CAPncwv%2B_9%3DqH7a4zrkoah2KB%3Ds_VuM6veqq0f01XEXhLno7o7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi,
i have column name phone with integer datatype but when i enter phone
number it throws an error
"1325565488 is out of range for ActiveRecord::Type::Integer with limit
4"

i have changed limit to 8 in migration file but still it didn't work.

Any kind suggestions would be appreciated. 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+unsubscribe@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/ffb4a1a1018546058e1a326469ef73b8%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 24 March 2016 at 17:09, Aman Aman <lists@ruby-forum.com> wrote:
> I was following the tutorails in
> https://www.railstutorial.org/book/account_activation_password_reset#sec-activating_the_account
> for usr email activation. I successfully got the mail in development log
> file but when enter that url it does not opens.

What url are you entering?

> I have again checked the log file for error but there is no error on it
> . And when I check my server console it give prints the following :
>
> [2016-03-24 22:37:58] ERROR bad Request-Line
> `\x16\x03\x03\x00?\x01\x00\x00?\x03
> \x03V?\x1E?\x11?\x04?M??y?b????yGl?\x03S\x11?\x00?\x10E?`\x00\x008?0?/?(?'?\x14?
> \x13\x00?\x00?\x00?\x00?\x00=\x00<\x005\x00/?,?+?$?#?'.
> [2016-03-24 22:37:58] ERROR bad Request-Line
> `\x16\x03\x01\x00}\x01\x00\x00y\x03
> \x01V?\x1E??-O??'aY?R?GZ;?g^9F??E?\x1Ct?\x00\x00\x18?\x14?\x13\x005\x00/?'.

Post the section of the log that is generated when you enter the url,
or do you mean there is nothing added to the log? It looks like some
sort of encoding error.

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+unsubscribe@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%3D0gLvi%3DpiXfWUAq-j33eAhx9J3Wg4kiX65TLV_jmSU4UrEOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I was following the tutorails in
https://www.railstutorial.org/book/account_activation_password_reset#sec-activating_the_account
for usr email activation. I successfully got the mail in development log
file but when enter that url it does not opens.
I have again checked the log file for error but there is no error on it
. And when I check my server console it give prints the following :

[2016-03-24 22:37:58] ERROR bad Request-Line
`\x16\x03\x03\x00?\x01\x00\x00?\x03
\x03V?\x1E?\x11?\x04?M??y?b????yGl?\x03S\x11?\x00?\x10E?`\x00\x008?0?/?(?'?\x14?
\x13\x00?\x00?\x00?\x00?\x00=\x00<\x005\x00/?,?+?$?#?'.
[2016-03-24 22:37:58] ERROR bad Request-Line
`\x16\x03\x01\x00}\x01\x00\x00y\x03
\x01V?\x1E??-O??'aY?R?GZ;?g^9F??E?\x1Ct?\x00\x00\x18?\x14?\x13\x005\x00/?'.

--
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+unsubscribe@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/d9ec2e118a5593f2d3df5ddb54e8a640%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

hi,

im trying to find the simplest way of bulding a user dashboard. currentyl using namespace like this:

  resource :dashboard, to: 'dashboard#index', as: 'dashboard'do
     resources :vehicles , to: 'vehicles#index'
  end

> controller action is using its own layout file (one yield section), but now i need to rename all link_to's accordingly.


>> how can i build a simple dashbaord so i can reuse all resources within without changing them?
(should be as simple as the application-layout, ....)


thx



--
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+unsubscribe@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/CADQqhMeE3XBu-azSehYeG0dfoKvOcqJcRQWxR4uZYeR5ne8%2BHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

House cleaning services, Commericial , home cleaning service, sofa
cleaning service, Deep Cleaning Services, House Cleaning Services,
Villa Cleaning services, Bungalow Cleaning Services, Apartment Cleaning
Services, Move In & Move Out Cleaning Services, Tenanant Complete
Cleaning Services, Bath Room Cleaning Services, Kitchen Cleaning
Services, Mattress Cleaning Services, Terrace Cleaning Only, Balcony
Cleaning Services, Pest Control, Mumbai, Pune, Bengaluru, Hyderabad.

--
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+unsubscribe@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/99e733e39b89c0043474541065813688%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Colin Law wrote in post #1182423:
> On 24 March 2016 at 09:05, Poombavai Sivamani <lists@ruby-forum.com>
> wrote:
>> Hi..I want to make some of my text fields to auto fill with zero(0),
>> when the user selects NA in dropdown.. How can I achieve that? Is there
>> any rails way to do that??
>>
>>
>> I have seen lot of jquery to accomplish auto fill values.. I am new to
>> rails as well as am zero at jquery.. That is why I am looking for a
>> rails way to do that.
>
> jQuery is the way to do it. I suggest starting by finding some
> tutorials, probably best to start off with basic javascript.
> Scripting in the browser is not trivial however, be prepared to spend
> some time learning the basics.
>
> Colin

Thankyou Colin.. I will start to learn javascript.. Thankyou for your
response..

--
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+unsubscribe@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/c22ae79e5709de8636eba5012fa4be5c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 24 March 2016 at 09:05, Poombavai Sivamani <lists@ruby-forum.com> wrote:
> Hi..I want to make some of my text fields to auto fill with zero(0),
> when the user selects NA in dropdown.. How can I achieve that? Is there
> any rails way to do that??
>
>
> I have seen lot of jquery to accomplish auto fill values.. I am new to
> rails as well as am zero at jquery.. That is why I am looking for a
> rails way to do that.

jQuery is the way to do it. I suggest starting by finding some
tutorials, probably best to start off with basic javascript.
Scripting in the browser is not trivial however, be prepared to spend
some time learning the basics.

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+unsubscribe@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%3D0gLsoY1uK6_qZabbqAZYjn1CGSCsDUORy6%3D9MseVyBe%3DkHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.