I just installed a new rails 3 application on ruby 1.9.2 for the first time using Refinery CMS.
Everything went well using refinerycms to install the application, but passenger is having issues with the application.
Passenger says Rack can not start gives me error:
"No such middleware to insert after: ActionDispatch::Static"
I am running several other rails applications on my server using passenger without trouble; although none of those applications are using refinerycms.
Help much appreciated as this is a project in a class I'm taking and have very limited time to complete the scope of this project, would be awesome to get started.
In your config/environments/production.rb file you have to specify:
config.serve_static_assets = true
This enables ActionDispatch::Static and is a requirement of Refinery CMS.
Related
I'm building a react-rails app with rails 5.2.
react-rails-hot-loader is not compatible with rails 5.2, the live reloding would work with react_on_rails and I am trying to understand how to configure webpacker to live-reload
I had a read at the following issue
I run ./bin/webpack-dev-server --inline=false and my rails s in a separate terminal instance, but I can not display the site on webpacker localhost:3035/movies. The output in the browser is Cannot GET /movies
I just created the repository, do not know webpacker and would really appreciate any input.
webpacker 3.3.5 supports hot reloading
running ./bin/webpack-dev-server and rails s in a different terminal allows you to use hot reloading features
My understanding is that webpacker development server will provide the js, css and image assets to the rails server.
The application is available at localhost:3000 (from the rails server) for development with hot reloading. I started the webpacker dev server before my rails s
Some more article explains more in details how to configure the webpacker server
https://medium.com/statuscode/introducing-webpacker-7136d66cddfb
https://medium.com/rubyinside/hot-module-reloading-with-webpacker-b663643a60b1https://github.com/justisb/react_on_rails/blob/master/docs/additional-reading/hot-reloading-rails-development.md
https://learnetto.com/tutorials/hot-module-replacement
I am new to the rails programming. I was building my first rails application.
In internet I was searched how to run the rails application in rails 2.3.14 version. But I did not get the answer.
I know how to start the server. But I don't know how run the rails application.
Can anyone please explain me how to run the rails application in 2.3.14 version.
You start a server in Rails 2.3 with:
./script/server start
That starts a local server in development mode, browse to http://localhost:3000 to see your application.
You might want to have a look at the other scripts in the scripts folder too, you will find a subset of modern rails commands. Like
./script/console
to open the Rails console.
But I wouldn't recommend to learn Rails with a 2.3 application. 2.3 has many differences to modern Rails 4.2 or 5.0 application.
I'm in the process of setting up my VPS (linode) to host a few rails websites. What are some good options for setting up one server that will be hosting rails websites that are on different versions of rails and ruby. For example
foo.com - ruby 1.9.2, rails 3.0
bar.com - ruby 1.9.3, rails 3.2.3
I've seen only one blog post (using passenger) regarding a setup like this but I'm interested in finding out what some other solutions look like. Or if this is a BAD idea and I should be using different VPS's for each I'd like to know othat too.
You can use for example standalone Passenger or Unicorn instances per application, and reversproxy them via Apache or Nginx so it will respond on default port 80
I am trying to deploy my Refinery blog CMS to a staging server.
The app works fine on my development but annoyingly it does not online. I get the following error from passenger:
No such file to load -- /path/to/app/releases/20120217232643/webapp/app/mailers/refinery/blog/comment_mailer
I am totally baffled, being new to Rails, I though it would work out the box. Especially as it works somewhat fine on my development machine.
I would appreciate a pointer or two.
Thanks
M.
Ok, I have found the answer ... which is in the error itself!
head over to the refinery blog git and locate that missing file:
Git Hub Refinery Blog/comment_mailer.rb
Download that to: app/mailers/refinery/blog
And presto, no more issues with passenger (not sure why the error popped up in the first place if the refinery blog has it within their app!?!)
Try running it with Rails 3.0 you can install it with gem install rails -v 3.0. According to the "Getting Started Guide" (see http://refinerycms.com/guides/getting-started-with-refinery) Refinery runs on Rails 3.0.
Trying to follow the "Ruby on Rails 3 Tutorial" and running rails s, getting the following error:
[path]\config.ru:1 in 'require': no such file to load -- fake_app
I've got the location of fake_app.rb in the PATH (which I presume is what rails/rack is trying to find)
Contents of config.ru are the default generated:
require "fake_app"
run Rack::Test::FakeApp
I am running rails 3.0.8 and Windows 7
Thanks for helping this complete novice out!
Did you generate this with rails new [appname] command? A default Rails 3.0 config.ru file should look more like this:
require ::File.expand_path('../config/environment', __FILE__)
run ApplicationName::Application
If all you've done at this point is install Ruby and Rails, I'd re-run the generator to get something that works.
Also, since you're on Windows, I wanted to recommend Rails Installer for your environment installation and setup. It mitigates a lot of the startup pain.
This is probably the tutorial you are speaking of, but I also highly recommend Michael Hartl's Ruby on Rails Tutorial for a solid introduction to Rails 3. The section about generating your first application may be handy in this situation.