Talk:The Rails Port
Discuss The Rails Port page here:
rubyonrails.org showcase
Can someone drop a note to rubyonrails.org so they can showcase the openstreetmap depoyment? - User:Mila 19:32, 18 July 2009
Problem with sql_session_store
When checking out via svn co http://svn.openstreetmap.org/sites/rails_port error is reported
Fetching external item into 'rails_port/vendor/plugins/sql_session_store' svn: Server sent unexpected return value (405 Method Not Allowed) in response to PROPFIND request for '/svn/plugins/sql_session_store/trunk'
This is because these repos are no longer hosted at http://railsexpress.de/svn/plugins/sql_session_store/trunk they now reside at http://github.com/joergbattermann/sql_session_store/tree/master and are obtaibable via:
git clone git://github.com/joergbattermann/sql_session_store.git
in the vendor/plugins directory
also needed:
svn co http://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
in vendor/plugins
and on Ubuntu 8.10 needed:
sudo apt-get install ruby1.8-dev
...solved gem being able to install libxml-ruby and RMagick
--SamRose 13:20, 15 April 2009 (UTC)
Проблема при выполнении ~$ bundle install
Устанавливаются все пакеты за исключением memcached (1.3.7) При попытке установить проблемный пакет отдельно, инсталлятор выдает в терминал гигантский лог. При попытке уставить более ранние версии memcached происходит то же самое. Операционные системы где проявляется ошибка: Ubuntu 10.04 Ubuntu 11.10
Эта ошибка не может быть устранена пользователем, незнакомым с Rails. Выше приведенный факт ставит под сомнение ценность статьи как части wiki-проекта
Translation: The problem in the performance of ~ $ bundle install
Installed all the packages except for memcached (1.3.7) when trying to install the package the problem separately, the installer displays a huge log into the terminal. If you try to stare earlier memcached is the same. Operating systems where the error appears: Ubuntu 10.04 Ubuntu 11.10
This error can not be removed by the user, unfamiliar with Rails. The above fact calls into question the value of the article as part of a wiki-project
User:Dmitriy 06:27, 20 February 2012
rake problems I encountered...
I encounter Error ! As follower aj@ubuntu:~/rails$ rake gems:install --trace rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) Please install RDoc 2.4.2+ to generate documentation.
- Invoke gems:install (first_time)
- Invoke gems:base (first_time)
- Execute gems:base
- Invoke environment (first_time)
- Execute environment
rake aborted! syntax error on line 9, col 2: host: localhost' /usr/lib/ruby/1.8/yaml.rb:133:in `load' /usr/lib/ruby/1.8/yaml.rb:133:in `load' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:926:in `database_configuration' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:437:in `initialize_database' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:141:in `process' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `send' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `run' /home/aj/rails/config/environment.rb:9 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/tasks/misc.rake:4 /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/tasks/gems.rake:17 /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Tasks: TOP => environment
Two problems I encountered...
... and how I resolved them. I am a Ruby/rails newbie, but maybe sharing my experience will help others.
My configuration was: Debian GNU/Linux "Lenny" amd64 (x86_64)
- When installing several gems, it showed dependency errors. For example, the postgresql connector failed. The headers and libraries were there (libpq-dev), so I was confused at first. The problem turned to be "gem install" using cc as the compiler, instead of the available gnu version "gcc". Creating a link or an alias will be enough to solve it.
- After setting up the database and the software, the site worked seamlessly. However, any call to the API (via wget or with the "data" overlay at the main page) resulted in an error: 501 internal error. Reviewing the logs I found that the request was processed and even it generated a good sql query, but failed with the following message:
API threw unexpected NameError exception: uninitialized constant XMLEncoding::UTF_8
A dependency was missing: Builder gem. So:
# gem install Builder
and everything worked fine. --jynus (discusión) 12:01, 23 April 2010 (UTC)
libmagick
On Ubuntu 10.04 LTS I had to install libmagick9-dev and libxslt-dev to satisfy ruby dependencies:
apt-get install libmagick9-dev libxslt-dev
-- Martijn van Exel 11:50, 16 May 2010 (UTC)
Issues with installation on Ubuntu 11.04
I will update the wiki with this when I have finished, but thought I'd put it here for now.
- It appears to need rails version 2.3.14, (not 2.3.8 or 2.3.11)
- The tests gave three failures:
/usr/bin/ruby1.8 -I"lib:test" -I"/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib" "/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb" "test/functional/**/*_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
.................................F.F.F.....................................................................................................................................................
Finished in -44161077.318441 seconds.
1) Failure:
test_changes_simple(ApiControllerTest) [test/functional/api_controller_test.rb:207]:
Expected response to be a <:success>, but was <500>
<"">
2) Failure:
test_changes_zoom_valid(ApiControllerTest)
[test/functional/api_controller_test.rb:231:in `test_changes_zoom_valid'
test/functional/api_controller_test.rb:229:in `upto'
test/functional/api_controller_test.rb:229:in `test_changes_zoom_valid']:
Expected response to be a <:success>, but was <500>
<"">
3) Failure:
test_hours_valid(ApiControllerTest)
[test/functional/api_controller_test.rb:260:in `test_hours_valid'
test/functional/api_controller_test.rb:258:in `upto'
test/functional/api_controller_test.rb:258:in `test_hours_valid']:
Expected response to be a <:success>, but was <500>
<"">
187 tests, 2413 assertions, 3 failures, 0 errors
- It appears to need the latest stable version of osmosis (0.39), not 0.38 which comes with Ubuntu, or 0.30.3 as stated on the wiki page, otherwise you get an error about a missing column in the users table.
Examples of installation/usage
I'd like to add a link to "User:BigPeteB/Setting up a local database copy", where I've documented my experience setting up a database, Osmosis, and the Rails port, but I'm not sure where to put it. --BigPeteB 18:04, 29 September 2010 (BST)
Page move
Somebody moved this page to a new title (twice actually). I've moved it back to it's original title 'The Rails Port'
Why? Because there's about a bazillion pages linking to this original title (Special:WhatLinksHere/The Rails Port) because this is very old wiki page deeply meshed into the wiki (and many external sites) We could move the page, but that would be a fairly big thing to do. We should discuss it first.
-- Harry Wood 23:50, 23 June 2011 (BST)
- I couldn't find the right place to discuss this thing. As it's an wiki i just did it, as we could easily move everything back. Moving pages in Mediawiki is no problem as long as the old names like "The Rails Port" redirect to the new name.
- There were many "rails port specific" pages in the wiki, which title don't really say, where they belong to. I think subpages are good way to achieve this, see Osm2pgsql and Tirex as example, so i moved the regarding pages to Rails_port/*. Now after your Name restoring all, relative links on this page don't work any more. So we need either
- move all subpages too (there is an checkbox in the moving form which does that) and repair the redirects from the old pages
- modify the links in the page
- rename it back to Rails_Port
- The main reason for this whole restructuring action by me is still unfixed: During the munich hacking weekend i came across the fact that we don't really describe the different database schemas we have at different parts. There is Database, Database schema, Osm2pgsql/schema Osmosis PostGIS "simple" schema and "snapshot" schema...
- There is some (outdated) overview at Databases_and_data_access_APIs#Database_Schemas but the main problem is that there are so many redundant pages inside this wiki. Maybe it would be a good starting point to define definitive names for the different databases and database schemas.
- But maybe this database thing should not be discussed on the talk page of the rails port... ;-)
- --Saerdnaer 11:19, 24 June 2011 (BST)
- Yes the database pages are a bit messy aren't they? We should start some little Talk page discussions about how to tackle those messes too.
- OK so I see there's been several other page moves. A lot of the Special:PrefixIndex/Rails port pages under a 'Rails port' subpage were moved to that position by you and User:Avatar. because "title don't really say, where they belong to"? . Using wiki subpages isn't necessarily the organisational masterstroke people tend to imagine it to be. Wikis link and flow more naturally with simpler page titles (more on that here). Then again many of your page moves do work quite nicely actually (and Tirex is an example of subpages working quite well) although I'm not convinced that "Rails port/Development" is a better page name than "Committing to the rails port" for instance.
- So anyway just thinking about the name of this page. "The Rails Port" is a bad name and I've thought about moving it for a long time. "Rails port" is slightly better name, so I do actually support the move, but not without discussing, and not without fixing all the double-redirects it creates.
- One thing to discuss... if we're going to the trouble of moving the page (and adjusting lots of incoming links) we might consider that this thing is only called "The Rails Port" because once upon a time the code was ported from pure ruby. The name just stuck. It might better be called the "Rails App" (or other suggestions?). Something to consider perhaps, but then arguably that's too interfering. The wiki should be "descriptive not prescriptive" some might say. I don't know to what extent people call it "the rails port" because the wiki influences them to call it that. Does that name get used on the mailing lists a lot? not sure.
- In summary a move to "Rails port" is not such a bad idea. What do other people think though?
- -- Harry Wood 00:57, 27 June 2011 (BST)
- Leave it as-is. It's currently known as "the rails port", you'll hear people saying "I was hacking on the rails port this weekend", similarly "I was hacking on osmosis" or "I was hacking on osm2pgsql". In other words, the definite article ("the") is part of the name of the software. It's a stupid name, and it would be great to have a better one, but that's no justification for getting its current name incorrect. Gravitystorm 09:24, 15 November 2011 (UTC)
GIST indices
Shouldn't the GIST indices be created on all three databases (production, dev and test)? It's my first time setting up the rails port, so I didn't want to edit the main page directly. Martijn van Exel 23:13, 7 January 2012 (UTC)
Gems (libraries) fails
I assume the line
# cd /path/to/rails_port/
directs me to where I cloned openstreetmap-website.git into?
In the current tip of branch master (1cc882b23f161ade83fb94052fa4a43c0caa16d2) there is no file "config/postgres.example.database.yml" (anymore?), thus the copy in
# cp config/postgres.example.database.yml config/database.yml
fails. Subsequently (but I don't know if caused by this),
# bundle install
fails at "gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/1.8/x86_64-linux -I. -fPIC -I/usr/lib/ruby/gems/1.8/gems/memcached-1.4.1/ext/include -L/usr/lib/ruby/gems/1.8/gems/memcached-1.4.1/ext/lib -fno-strict-aliasing -g -g -O2 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Os -c rlibmemcached_wrap.c" with a rather extensive error list.
Is there a workaround? (If this is the wrong place to ask this question, I apologize. Please redirect me to a more appropriate place). Baeuchle 16:29, 16 March 2012 (UTC)
Yes, I had the same issue on 11.10. Before "bundle install", run "sudo apt-get install libsasl2-dev" . This solved the above problem.
--Fodor99 08:01, 6 April 2012 (BST)