Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 363 Vote(s) - 3.46 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix / debug 'expected x.rb to define X.rb' in Rails

#11
I had this problem for a while and in my case the error was always preceded from this S3 error:

> (AWS::S3::Operation Aborted) "A
> conflicting conditional operation is
> currently in progress against this
> resource. Please try again."

This problem usually occurs when creating the same bucket over and over again. (Source [AWS Developers forum][1])

This was due to the fact that I had used `attachment_fu to` create the bucket and I had decommented the line containing the command `Bucket.create(@@bucket_name)` in `lib/technoweenie/attachment_fu/backends/s3_backends.rb` (near to line 152).

Once commented or deleted the command `Bucket.create(@@bucket_name)` the problem disappeared.

I hope this helps.

[1]:

[To see links please register here]

Reply

#12
You can try disabling all your plugins and add them back in one by one.

In `environment.rb` in the Initalizer section, add a line like this one:

config.plugins = [ :exception_notification, :ssl_requirement, :all ]

Start with the minimum set to run your application and add them in one by one. I usually get this error when I've defined a model that happens to map to an existing filename. For example, a Request model but Rails already has a request.rb that gets loaded first.
Reply

#13
I've encountered this before, and the `AttachmentFu` plugin was to blame. I believe in my case it was due to `AttachmentFu` expecting a different image processor than what was available, or non-supported versions were also installed. The problem was solved when I explicitly added `:with => :rmagick` (or similar -- I was using RMagick) to the `has_attachment` method call *even for non-image attachments.* Obviously, make sure that your production environment has all the right gems (or freeze them into your application) and supporting software (ImageMagick) installed. YMMV.

As for not getting Rails and AttachmentFu to suck up and hide the real error -- we fixed it before figuring it out completely.
Reply

#14
That is a tricky one.

What generally works for me is to run "script/console production" on the production server, and type in:

`Announcement`

That will usually give you a better error message. But you said you already tried that?

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through