Rails 3 - DEPRECATION WARNING: RAILS_ROOT is deprecated. Please use ::Rails.root.to_s - ruby-on-rails-3

I am getting from today still this error message. I found this thread - Unable to locate where deprecated RAILS_ROOT is used - and I tried to run grep -R RAILS_ROOT ., but nothing happend.
No error or information message after run this command.
Can anyone help me, please, where could be problem about this message? Thanks you

Unless you have specific reasons to use Paperclip version 2.3.0, upgrade. If you look in the gem sources for that version you will find it uses RAILS_ROOT in lib/paperclip.rb.

Related

"invalid version 0 on git_proxy_options" from libgit2: cause? fix? walk-around?

I'm getting this error "invalid version 0 on git_proxy_options" from libgit2. This did not happen until very recently (I have recompiled my code so it may be a version issue). I'm not using a proxy. Does anyone know anything about this? What causes this message? Is there anything I can do to stop the failure? Either a fix or or a work-around will do.
Specifically, I am using the Rust crate git2 version 0.13.23. I am doing a fetch that triggers the error. This is on Fedora 34 on x86_64. I have searched on this but there does not seem to be any matches that help.
git2 = {version="0.13.22", features = ["vendored-libgit2"]}
in Cargo.toml fixed the issue.
Interesting...
I had upgraded libgit2 to 1.3.0 from 1.1.1. That broke my existing cargo install, so I unpacked the previous libgit2.so.1.1 with a symlink to libgit2.so.1. That's when this error condition showed up. After thinking a bit I decided to symlink libgit2.so.1.3 to libgit2.so.1.1 and it built my new cargo version which linked to the new libgit2.so.1.3. Then I deleted my libgit2.so.1.1 stuff. Kinda weird, and usually you expect things not to work when it has been linked to a previous .so version.

Why am I unable to use glog due to incorrect hash?

Related to my question on ReactNative init setup process being awful, I am unable to download glog due to an incorrect hash. Does anyone know what is going on here? How can I fix this so that I can use react-native properly? I have tried clearing my entire .rncache and it did nothing.
It does look like glog-0.3.5 is the most recent version... so why am I having a nightmare of a time using this? Why is the hash incorrect? Does ReactNative install something with a different hash than it is supposed to?
Incorrect hash:
61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc
?/Users/me/.rncache/glog-0.3.5.tar.gz
Retrying...
Failed to successfully download 'glog-0.3.5.tar.gz'. Debug info:
-rw-r--r-- 1 root staff 532275 Feb 15 18:24 /Users/me/.rncache/glog-0.3.5.tar.gz
61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc
/Users/me/.rncache/glog-0.3.5.tar.gz
Command PhaseScriptExecution failed with a nonzero exit code
My error was located a bit above yours in the console.
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
I fixed this by symlinking to the version I had.
ln -s /usr/local/opt/readline/lib/libreadline.7.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
If the lib does not exists and you are using Mac you can use a custom brash with brew.
https://itnext.io/upgrading-bash-on-macos-7138bd1066ba
Actually #FOLOG's suggestion, while working, was a bit of a ghetto fix. I encountered this issue and went to dig a little further and found the culprit to be gawk.
The clue is here: Referenced from: /usr/local/bin/awk
Assuming you are on Mac, just run brew upgrade gawk to fix the problem.

Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/sbin/httpd: undefined symbol: apr_bucket_alloc_aligned_floor

I am getting this error When i have Started the apache server
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/sbin/httpd:
undefined symbol: apr_bucket_alloc_aligned_floor
Please help me on this.
i got this error too this morning, it was a module conflict.
Removed the conflicting module, then ran easyapache 4 and reprovisioned the profile in WHM.
The conflicting module was:
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for ea-apache24-mod_cloudflare which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of ea-apache24-mod_cloudflare of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude ea-apache24-mod_cloudflare.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of ea-apache24-mod_cloudflare installed, but
yum can only see an upgrade for one of those arcitectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of ea-apache24-mod_cloudflare installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: ea-apache24-mod_cloudflare-1.2.0-.5.47.x86_64 != ea-apache24-mod_cloudflare-1.2.0-.5.37.i686
Run yum update to see the error, or what ever command your OS has to check for updates.
Regards,
Tommy
If dealing with cPanel, check for updates via yum. In my case, updates were needed, so updated all yum packages.
I then found PHP scripts were not being parsed. Check that the PHP handler is set to whatever your handler should be. In my case, the handler was set to "None".
I hope this helps!

Nokogiri on Mac: "Symbol not found: _xmlAddChild" How do I fix this?

I have been running Cucumber for my Rails app for quite some time without problems. Looks like something changed (but I don't know what), because now Nokogiri does not want to work. Apparently it's having trouble finding the symbol "_xmlAddChild". Not sure I even know what that means. Can you point me in the direction of reading material that can educate me, or suggest a solution?
Here's my error output:
/Users/me/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
dlopen(/Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle, 9): Symbol not found: _xmlAddChild
Referenced from: /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle
Expected in: flat namespace
in /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle - /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle (LoadError)
Here's what I've found online:
http://rubyforge.org/tracker/index.php?func=detail&aid=27256&group_id=494&atid=1971
I tried updating the nokogiri gem alone, and with all other gems. No luck so far.
Really stupid solution here. The problem arose when another developer on the project put this line into the features/support/env.rb file used to run Cucumber.
require 'capybara'
It doesn't seem to serve a purpose, and when I removed it, the whole issue went away. I really have no idea what the error involving "_xmlAddChild" was.

heroku rake require 'rake/dsl_definition' fix not working + breaking local rake

I'm having the same heroku rake issues described (and from what I can tell solved) in this question.
When I try the fix (include require 'rake/dsl_definition' above require 'rake') I get the same
'uninitialized constant Rake::DSL'
error from heroku + I get the error
'no such file to load -- rake/dsl_definition'
from my local rake.
Without incorporating the fix (using the standard rakefile) I can use rake on my local setup with no errors (with the same heroku error)
I'm using rake version 0.8.7 (though I get the same results using 0.9.2) and Rails 3.0.9. I've gone through the suggestions in the previous question but from what I can tell the problem isn't with my Gemfile. Has anyone else had this problem? Has anyone else solved their heroku rake problem using a different solution? Or can anyone explain/suggest how I'm going about this incorrectly?
Thank you for your help.
Try adding require 'rake/dsl_definition' on top of Rakefile.
Not enough for me. I was getting the no such file to load -- rake/dsl_definition error even adding the require 'rake/dsl_definition' line in the "Rakefile" file
I had all gems version OK and only 0.8.7 rake version but I had to create a "Gemfile" in the redmine root path with the next content:
gem "rake", "0.8.7"
And delete the require 'rake/dsl_definition' line added previously in Rakefile
Hope be usefull for someone