lundi 2 janvier 2017

Mina deploy 1.0.6 Identity file

After update Mina the indentity file is not accessible. someone have the same problem with the mina 1.0.6?

Warning: Identity file ~/.ec2/gsg-keypair not accessible: No such file or directory.

       Permission denied (publickey).

 !     Run Error

I urgently need an online ruby on rails development environment

I am using cloud9 at the moment and it is giving me problems... I need an alternative very fast! my project is due tomorrow any suggestions?

what is the difference between render method options ( content_type and formats)?

In rails guide http://ift.tt/2iB9DXh, what is the difference between render method options ( content_type and formats)? how is this related to response header?

how do I change environments in ruby on rails

At the moment, I am unable to run my server because apparently I seem to be in the wrong environment.

Suppose I am in the test environment, how do I switch to the production environment? Because right now, every time I am trying to run my app they keep telling me the server is running on the production environment.When I check to see if its running it still says that no application is running....

Is there a command I can use to switch environments?

limit the number of stack trace lines when exception is generated in rails

Is there a way i can control the number of stack trace lines generated when a exception scenario happen in a rails application.

The reason for this is i need the stack trace but not all the lines and other reason my log file grows to a huge amount after a while.

Any help would be appreciated. Thanks.

dimanche 1 janvier 2017

Having the following Error: NoMethodError in Posts#show

I keep getting the following error. I'm trying to develop my own blogging platform as a way for me to learn and get better.

Showing /home/ubuntu/workspace/app/views/posts/show.html.erb where line #36 raised:

undefined method `post_comments_path' for

<#:0x007f88f0044248> Did you mean? posts_path

<h2>Add a comment:</h2>
<%= form_for([@post, @post.comments.build]) do |f| %>
  <div class="field">
    <%= f.label :author %><br />
    <%= f.text_field :author %>

undefined method `[]' for false:FalseClass on adaptivepayments-sdk-ruby

Someone is having this issue? or now why this is happing on configuring the paypal sdk adaptive?

place the configuration on the yml did not show this message but did not work either, so

i place the sdk configure on: buy action

and on the log shows:

line 58 is PayPal::SDK.configure

NoMethodError (undefined method []' for false:FalseClass):
app/controllers/orders_controller.rb:58:in
buy'

def buy
    require 'paypal-sdk-adaptivepayments'

    PayPal::SDK.configure(
      :mode      => "live",  # Set "live" for production
      :app_id    => "APP-xxxxx",
      :username  => "xxxx.yyyy.com",
      :password  => "xxxx",
      :signature => "xxxxx" )



      @api = PayPal::SDK::AdaptivePayments.new


      order = Order.find(params[:id])


      @pay = @api.build_pay({
        :actionType => "PAY",
        :cancelUrl => carts_url,
        :currencyCode => "US",
        :feesPayer => "SENDER",
        :ipnNotificationUrl => ipn_notification_order_url(order),

        :receiverList => {
          :receiver => [{
            :email =>  seller@seller.com,
            :amount => 1.0,
            :primary => true},
            {:email => buyer@buyer.com,
             :amount => 1.0, 
             :primary => false}]},
             :returnUrl => carts_url })

             @response = @api.pay(@pay)

             # Access response
             if @response.success? && @response.payment_exec_status != "ERROR"
               @response.payKey
               redirect_to @api.payment_url(@response)  # Url to complete payment
             else
               @response.error[0].message
               redirect_to fail_order_path(order)

             end
  end