Ruby on Rails - Error but nothing is logged - ruby-on-rails

Hello I'm trying to install the latest redmine (2.5)
And I already setup the environment using ruby 1.9.3 and rails 3.2.17
I already setup the passenger and it's already running
But when I'm trying to access it always return the 500 (Internal Error) page
and when I check in the production log, there is nothing printed in it.
Is there anybody here have any idea where I go wrong? or at least how to know what is the error?
Thank you!

You can try by making the permission 777 and try to check the log by typing tail -f log/production.log
You have to give full permission for the log file.

Related

Error when trying to run rails server (Gemfile not found)

I've ran into a error that haven't happened before and haven't found a real solution online. Everytime I try to run a rails command like rails server or rails generate scaffold I get the following error:
D:/myrailsapp/config/.../Gemfile not found
Any ideas how to fix this? I had it working after the error without doing anything and now I can't run it again.
It might be related to this https://github.com/RailsApps/rails-composer/issues/138
try running
gem update

Rails Server Error - Fail after Gem Update

I was trying to make a contact form using this site
I made it to mount ContactForm then ran bundle update and bundle install. Now I am unable to start the rails server. I get this error:
Error: Command not recognized
Usage: rails COMMAND [ARGS]
I have used git to checkout my last working copy of the app but I still am unable to start the rails server and have tried searching for answers online, unsuccessfully. Please help. I do not know how to continue to work on my website.
Thank you.
No need to respond. I tried first updating my Gemfile to the specific versions I know I was using before the rails server failed to respond. I had no luck there. Then I just uninstalled every gem and reinstalled them all and was able to get it up and running again. Mystery to me, but solved.

Why can't I start my webserver (`rails server`)?

I've created a new rails app using rails composer (https://github.com/RailsApps/rails-composer). however when I start my rails server (WEBrick), I get the following error:
~/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied
I've looked at this question and tried the steps in the selected answer but I'm getting the same issue. This seems like a conflict between RVM and Bundler since I've got ruby-1.9.3 as the top level directory and 1.9.1 as an intermediate directory. Not really sure what that means.
Any help is greatly appreciated.
This is generally the result of some directory in your Rails directory not having the correct permissions.
Here is an in-depth discussion of the permissions in Rails: https://stackoverflow.com/a/6091058/1669208
If you wanted to check to see if that was the problem. Then on a NON-PRODUCTION SERVER give 777 access to the entire rails directory.

Error while running ruby script/server

I got an error while running ruby script/server,
DRb::DRbConnError in HomeController#index
druby://localhost:3333 - #
Iam not able to understand where is the exact error, is there any gem missing or server issue.
I don't know what the ruby app you are trying to start is supposed to do but it seems to use a DRB server, which you would have to start before.

$PATH confusion Postgres and Rails on OSX Lion

Rails and all my gem files + homebrew installs have been working fine up until this point.
I ran
homebrew install postgresql
and was following the prompts pretty much as indicated in this video but it kept giving me error messages saying there is a server already running. I checked
which psql
in the terminal and it reported a
usr/bin
location rather than
usr/local/bin
indicating I was using the postgres that comes with osx not the new homebrew install.
When I attempted to start the database server I recieved an error message saying the server is already running. There is a mention of this error message in the postgres help documentation but no real working solution.
Attempting brew doctor confirmed that i needed to change my PATH in .bash_profile.
I came across this little snippet here on stack overflow for the .bash_profile edit.
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin
I saved the file and managed to get postgres up and running fine but then when I went to start a new rails app.
rails new blog -d postgresql
it says
Rails is not currently installed on this system. To get the latest version,
simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
Any attempt to install does not work until i change the bash_profile file back to what it was before.
If I change it back postgres has the same issue again saying there is already a server running.
Also I thought it might be a launch agent or something but I don't think there are any that are set up.
I figure either something is installed in the wrong place or I have to add something to the .bash_profile?
Don't set your $PATH explicitly. You should append or prepend to it instead:
# In your .bash_profile
export PATH="/usr/local/bin:$PATH"
My guess is that you either use RVM or rbenv. If you change your path to /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin explicitly then RVM or rbenv won't be in your path.

Resources