Hi, I''ve been playing around with rails for a while now and really like the way it works. However, I''ve had no end of trouble trying to get my application working on my webspace. With a bit of work I can get my app to work with sqlite, but using mysql has been a different story. At first, I had an error that said something like ''could not load /var/run/mysqld.conf. I contacted my host who advised me to change the socket value in database.yml and to reupload dispatch.fcgi. I did this and now instead of receiving an error message, I just get a blank white page. Reversing the changes has no effect either. Can anyone suggest anything to try? I really want to get rails working but I am seriously considering rewriting my apps in kohana php as it just seems so much easier to get started with. Any advice would be greatly 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Dan, I have been working with PHP for around 9 years now. I switched to rails approx. 8 months ago. When I first switched to Rails I felt quite a bit like you do now. I thought to myself, PHP is easier (but only because I understood the language and frameworks I used). I found numerous issues setting up my starting application and once I got around that, I found more issues trying to get my application working on my host provider. However, in the end, I''m now able to setup any application and move that application to a production environment in very little time. In addition, because ruby is a completely object-oriented language and rails is a great framework to build web apps with, I find myself completing tasks that would have taken me weeks to do in PHP in a matter of hours and sometimes even minutes in rails. There''s too much to go into detail in just one post, but it appears to me you need to do a couple of things first and foremost before you move further. First, you need to become familiar with Ruby (the language) at a bare minimum. There are quite a few books out there and I''m going to give you a link that houses a lot of starter content in a moment. Second, you need to focus on creating a simple application and then deploying that simple application to the web. Once you understand the simple things, you can focus on more complex applications. Start right here in this topic: http://www.ruby-forum.com/topic/191189 I''ve outlined all of the starting woes and links I could muster when first exploring rails. You''ll find a lot of valuable information. The best advice I can give you right now is for exploring some free hands on training through the first link I provided on that page: http://www.buildingwebapps.com/learningrails Make sure you visit that and make this your very first project. You can download all of the movies and the entire process is free. This one project will teach you how to do everything from minimal tasks to advanced tasks and give you a great understanding of ruby on rails. Take good notes. Document steps you take that work so you can review your own steps later on. I created this website here in approx. 2 months time with no prior knowledge of rails. http://ncaastatpages.com I designed everything from start to finish and it includes a lot of under-the-hood mechanics that you can''t see when first visiting the page. It houses a full custom built administration system that allows me to control all site admin tasks, send various email articles by specific dates to subscribers, and is a fully functioning store. I created this site in 2 months working 11 hours a day using the link above along with some screencasts from Ryan Bates. You''ll still find me around here asking newbish questions. I do that because rails is deep and there''s a lot to learn. You can''t expect to learn all of it in a year. It might take you a good 2 - 5 years to become 100% familiar with the environment. However, you can do great things in a short amount of time - something I could never do with PHP. I hope that helps. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, thanks for that. The app I''m trying to upload is simply a new app with one model generated with a scaffold. I haven''t changed any of the auto- generated code. I just wanted to go through the process of uploading an app to see how it works. My main problem atm is the lack of error messages when something goes wrong. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dan Smith wrote:> Hi, thanks for that. > > The app I''m trying to upload is simply a new app with one model > generated with a scaffold. I haven''t changed any of the auto- generated > code. I just wanted to go through the process of uploading an app to see > how it works. > > My main problem atm is the lack of error messages when something goes > wrong.RoR has a pretty hefty learning curve, but after that you''ll often find yourself smiling as you code. http://www.buildingwebapps.com/learningrails This helped me a fair bit. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dan Smith wrote:> Hi, > I''ve been playing around with rails for a while now and really like the > way it works. However, I''ve had no end of trouble trying to get my > application working on my webspace. > > With a bit of work I can get my app to work with sqlite, but using mysql > has been a different story. At first, I had an error that said something > like ''could not load /var/run/mysqld.conf. I contacted my host who > advised me to change the socket value in database.yml and to reupload > dispatch.fcgi. I did this and now instead of receiving an error > message, I just get a blank white page. Reversing the changes has no > effect either. > > Can anyone suggest anything to try? I really want to get rails working > but I am seriously considering rewriting my apps in kohana php as it > just seems so much easier to get started with. > > Any advice would be greatly appreciated. > Thanks.Stay with rails of course :) The problems you mention are still far from ruby or rails itself. A recommendation would be to have your development environment as close to the one you''ll deploy with. I imagine you deploy on some Linux server. Have you developed your app with same environment? That reduces risks. Other thing is having to host your app in a hosting company with no real rails support. I changed from a standard one to one which specializes in rails and has lots of help and people that understand it so I can get real support when I need it. Cheers. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Jan 8, 2010 at 11:52 AM, Dan Smith <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, > I''ve been playing around with rails for a while now and really like the > way it works. However, I''ve had no end of trouble trying to get my > application working on my webspace. > > What is you webspace?I once tried to use dreamhost - it made me sad - I use hostingrails now for or heroku.com to bootstrap projects. Later on i use different things if i need to. Places written with rails in mind make life easier. So does Capistrano.> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dan Smith wrote:> Hi, thanks for that. > > The app I''m trying to upload is simply a new app with one model > generated with a scaffold. I haven''t changed any of the auto- generated > code. I just wanted to go through the process of uploading an app to see > how it works. > > My main problem atm is the lack of error messages when something goes > wrong.Hi Dan, You really should get to know rails first and foremost in development. Finding a hosting provider or figuring out if your existing hosting provider will work or not is not difficult at all. However, without exploring your app first hand and seeing it work fully in development, it''s hard to become familiar with the concept of switching from development to production. This is why I really recommend that you forget all about your hosting provider for now and concentrate on the nuances of building your application. There are many great rails hosting providers (some mentioned already here). I personally recommend slicehost if you are wanting full control of your app and if you are familiar with linux distros. They have fantastic 24/7 support. If you aren''t, you can go with something like heroku which has a new support model where you can develop your app in the cloud. If the latter is the case, then you probably would want to go directly to Heroku, and start your development in the cloud since you know very little about rails right now and could become more familiar with their development/ide environment. It''s also in beta right now I believe, so I believe it''s still free. The biggest hurdle I see most people complain about really isn''t rails in particular, but rather choosing a development OS, a solid supporting IDE to code with, and which ruby and rails versions to produce your application on. Make sure you find and utilize a number of tools that make your coding comfortable while you learn the bits and pieces. There''s a lot of communication going on in various places. Rails is often a heavy topic in a lot of communities. Find one that works well for you and visit often. I''ve listed a lot of them in my beginning link for you. Take care mate. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 8, 6:52 pm, Dan Smith <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Can anyone suggest anything to try?Does your host give you shell access? If so, cd to your project directory and run script/console and RAILS_ENV=production script/console and see if you get any error message back in either case. If it''s successful, it should drop you to an irb prompt where you can type Ruby commands, ready with ActiveRecord already loaded. e.g.>> Things.find(:all)If you don''t have shell access, then at least use FTP to look at the files under logs/ (e.g. production.log, development.log etc) You could also try uploading a simple CGI like this: #!/bin/sh echo "Content-Type: text/plain" echo cd /path/to/your/app script/runner ''puts "all OK"'' 2>&1 Then point your browser at the CGI''s URL, and see what you get back. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 1/8/10 11:56 AM, "Dan Smith" <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> My main problem atm is the lack of error messages when something goes > wrong.The error messages are exactly where they are supposed to be: In the logs. You haven''t provided enough info about the app, the host, or the environment, but you should check: - log/production.log (assuming you are running production) - /path/to/error_log (or whatever your front-end server, presumably Apache, is) If you can''t ssh into your host with enough privileges to control your deployment directory and view the Web server log, time for a different host. You might try using mongrel to serve the pages for a bit until you get the app running. You do this, as follows: $ gem install mongrel $ mongrel_rails start -e production You will then begin serving pages on port 3000. HTH -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dan, Problems will be there no matter the framework, we don''t live in a perfect World afterall. That said and supposing you will insist using Rails, let me suggest you when asking for help, provide more details about your environment: In this case, please provide the Ruby, Rails and MySql versions, details of your internet provider. These information can help on helping you. Regards. On Jan 8, 4:52 pm, Dan Smith <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, > I''ve been playing around with rails for a while now and really like the > way it works. However, I''ve had no end of trouble trying to get my > application working on my webspace. > > With a bit of work I can get my app to work with sqlite, but using mysql > has been a different story. At first, I had an error that said something > like ''could not load /var/run/mysqld.conf. I contacted my host who > advised me to change the socket value in database.yml and to reupload > dispatch.fcgi. I did this and now instead of receiving an error > message, I just get a blank white page. Reversing the changes has no > effect either. > > Can anyone suggest anything to try? I really want to get rails working > but I am seriously considering rewriting my apps in kohana php as it > just seems so much easier to get started with. > > Any advice would be greatly appreciated. > Thanks. > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.