gem install passenger
passenger-install-apache2-module
And dont forget to adjust your apache config with the new settings. These are generated by the installer so you can just copy them.
gem install passenger
passenger-install-apache2-module
request.env['HTTP_X_FORWARDED_FOR']
request.env['REMOTE_ADDR']
which has just the same info, the calling IP.
def self.storage_name(repository)
"your_legacy_table_name"
end
storage_names[:default]='your_legacy_table_name'
def disable_geocoding
GeoKit::Geocoders::Geocoder.instance_eval do
def geocode(a)
res = GeoKit::GeoLoc.new
res.lat = 13.423007
res.lng = 52.534194
res.success = true
res
end
end
end
(4.85*100).to_i in irb and you will get: 484"%.32f" % 4.85 and you see the real value of this float. The reason is that to_i does just a truncate. (4.85*100).round.
render :text => js your resulting content type will be text/html which was a problem for the IE. But setting the mime_type like render :text => js,:mime_type => Mime::Type.lookup("application/javascript")
headers["Content-Type"] = "text/javascript".
<bean id="fooService"
class="com.agelion.server.impl.DummyService">
<bean name="/FooService"
class="org.springframework.remoting.caucho.BurlapServiceExporter">
<property name="service" ref="fooService"/>
<property name="serviceInterface"
value="com.agelion.server.FooBackendService"/>
</bean>
Net::HTTP.start('localhost', 8080) do |request|
response = request.post('/backendservice/FooService',
'<burlap:call><method>myMethod</method></burlap:call>')
vals = []
XPath.each( Document.new(response.body),
"//burlap:reply/list/map/*")
{|p| vals << p.text }
@bashvals = {}
1.step(vals.length-1, 2)
{ |i| @bashvals[vals[i]] = vals[i+1] }
public class SuiteTest extends TestCase {
TestResult tr = null;
public void testSuite() {
TestSuite suite = (TestSuite) YourTestSuite.suite();
suite.run(tr);
}
public void run(TestResult res) {
tr = res;
testSuite();
}
}
2) Whereas in maven1 it was simple to configure the unit tests with the <unittest> tag, this doesnt work in maven2 anymore. In the pom.xml you have to configure the surefire plugin which runs the test. Thats not obvious for a maven1 user, so its not easy to find the right documentation. But the maven2 concept is to be more plugable. So its easier to include Testng for instance.