我看到其他人也有类似的问题,但没有一个解决方案对我有用.0.3.14 gem存在于其他gem文件中.我完全按照此处的说明完成了所有操作:https://github.com/brianmario/mysql2.我仍然得到以下内容.我不知道为什么安装程序指示它找不到包含目录,因为我已经检查过并且它存在.thread.h文件存在,但不存在于ruby目录中.而是它在这里:C:\ RailsInstaller\DevKit\lib\perl5\5.8\msys\CORE \
我正在运行Windows 7并尝试在Aptana 3中构建我的rails项目.我的Ruby是1.9.3.
$ gem install mysql2 -v 0.3.14 -- --with-mysql-dir=C:\MySQL-Connector-C-6.1
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb --with-mysql-dir=C:MySQL-Connector-C-6.1
checking for ruby/thread.h... no
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Cannot find include dir at C:MySQL-Connector-C-6.1/include
-----
*** extconf.rb failed ***
Could …Run Code Online (Sandbox Code Playgroud) 我无法在Centos 6 VPS上安装插件.当我尝试安装时,我得到了这个:
Installing Plugin: BotDetect WordPress CAPTCHA 3.0.Beta1.7
Downloading install package from
[web path to:]botdetect-wp-captcha.zip…
Unpacking the package…
Could not create directory.
Return to Plugin Installer
Run Code Online (Sandbox Code Playgroud)
更新:这似乎与权限有关 - 我猜是有一些组织wordpress需要成为更改文件夹,创建文件等的一部分,但我无法弄清楚该组应该是什么是.我没有www-data组 - 我在某处读到了有关此要求的内容.有人可以告诉我WP需要存在哪些组和权限?
更新:我已经chmodded权限,以我的插件和上传文件夹,777我也已经创建了一个FTP用户专门针对WordPress的和做的主目录是用户同我WordPress的根文件夹作为推荐这里.然后我在wp-config.php文件中更改了这些行:
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__ . "/"));
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Run Code Online (Sandbox Code Playgroud)
至:
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__));
/** Sets …Run Code Online (Sandbox Code Playgroud) 我想在CentOS 6服务器上安装jpegoptim.我已经下载并解压缩了包但是当我尝试从jpegoptim-1.3.0目录运行./configure时,我收到一条错误消息:
"找不到libjpeg,或者你的版本太旧了(需要v6或更高版本)."
我已经检查过并且我有libjpeg-turbo安装,它应该取代libjpeg.我无法在网上找到关于这个问题的任何内容.我究竟做错了什么?
谢谢,罗布
我正在尝试为我的网站编写一个购物车,我想为每个项目显示一个表格,包括部分#,名称,数量,价格和一个小图像.除了图像之外,一切都显示得很好,图像出现在桌子的外面(上方),而不是放在我放置它的单元格中.这是代码:
//create a table for the items in the cart
print("<table class='cart_table'>");
print("<tr class='first_row'>
<td> Item No. </td>
<td> Item Name </td>
<td> Quantity </td>
<td> Price </td>
<td> Image </td>
</tr>");
//for each item in the cart
foreach ($_SESSION['cart'] as $value) {
//create a new product object for the item
$product = new LG_Product($_SESSION['cart'][$i]['item']);
print("<tr>");
print("<td> " . $product->itemID . " </td>");
print("<td> " . $product->productName . " </td>");
print("<td> " . $_SESSION['cart'][$i++]['qty'] . " </td>");
print("<td> $" . $product->productPrice . " </td>" );
print("<td>" . $product->showPrimaryImage('small') . "</td>");
print("</tr>");
}
//end the …Run Code Online (Sandbox Code Playgroud)